Skip to content

Docker compose migration #1692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions DOCKER_INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,56 @@ If you don't have Docker installed on your machine, you'll run into some complic

Below are the steps on how you can avoid that.

First you need to setup docker-compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene.
First you need to setup docker compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene.

## Linux

To install Docker Compose on Linux Ubuntu via the terminal, you can follow these steps:
To install Docker Compose on Linux Ubuntu, you can follow these steps:

1. Update the package index on your system by running the following command:
1. Create the Docker config directory and cli-plugins subdirectory:

```shell
sudo apt update
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
```

2. Install the required dependencies by running the following command:
2. Download the Docker Compose plugin:

```shell
sudo apt install curl
curl -SL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o $DOCKER_CONFIG/cli-plugins/docker-compose
```

3. Download the Docker Compose binary into the `/usr/local/bin` directory using the `curl` command:
Note:

- To install for all users, replace `$DOCKER_CONFIG/cli-plugins` with `/usr/local/lib/docker/cli-plugins`

3. Set the appropriate permissions to make the Docker Compose plugin executable:

```shell
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
```

4. Set the appropriate permissions to make the `docker-compose` binary executable:
If you installed for all users:

```shell
sudo chmod +x /usr/local/bin/docker-compose
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
```

5. Verify that Docker Compose has been successfully installed by running the following command:
4. Verify that Docker Compose has been successfully installed:

```shell
docker-compose --version
docker compose version
```

This command should display the version information of Docker Compose without any errors.
You should see output similar to:

```
Docker Compose version vX.Y.Z
```

After following these steps, you should have Docker Compose installed on your Ubuntu system, and you can use it by running `docker-compose` commands in the terminal.
After following these steps, you should have Docker Compose installed on your Ubuntu system, and you can use it by running `docker compose` commands in the terminal.

When you've verified that the `docker-compose` package is installed and you proceed to start Docker with `pnpm run docker`.
When you've verified that the `docker compose` package is installed and you proceed to start Docker with `pnpm run docker`.

You'll probably get an error similar to the one below:

Expand Down
1 change: 1 addition & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ services:
# - "REDIS_CLUSTER_CREATOR=yes"

electric:
container_name: electric
image: electricsql/electric:1.0.0-beta.15@sha256:4ae0f895753b82684aa31ea1c708e9e86d0a9bca355acb7270dcb24062520810
restart: always
environment:
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
"format": "prettier . --write --config prettier.config.js",
"generate": "turbo run generate",
"lint": "turbo run lint",
"docker": "docker-compose -p triggerdotdev-docker -f docker/docker-compose.yml up -d --build --remove-orphans",
"docker:stop": "docker-compose -p triggerdotdev-docker -f docker/docker-compose.yml stop",
"dev:docker": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d",
"dev:docker:build": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d --build",
"dev:docker:stop": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml stop",
"docker": "docker compose -p triggerdotdev-docker -f docker/docker-compose.yml up -d --build --remove-orphans",
"docker:stop": "docker compose -p triggerdotdev-docker -f docker/docker-compose.yml stop",
"dev:docker": "docker compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d",
"dev:docker:build": "docker compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d --build",
"dev:docker:stop": "docker compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml stop",
"test": "turbo run test --concurrency=1 -- --run",
"test:webapp": "turbo run test --filter webapp -- --run",
"test:packages": "turbo run test --concurrency=1 --filter \"@trigger.dev/*\" -- --run",
Expand Down