Skip to content

fix: c4d docker compose #1103

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 2 commits into from
Aug 26, 2022
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
70 changes: 56 additions & 14 deletions setup/coder-for-docker/local.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ DEVURL_HOST="*.mycompany.com"
For example:

```console
docker run --rm -it -p 7080:7080 -v /var/run/docker.sock:/var/run/docker.sock -v ~/.coder:/var/run/coder -e DEVURL_HOST="*.mycompany.com" codercom/coder:1.32.0
docker run --rm -it -p 7080:7080 -v /var/run/docker.sock:/var/run/docker.sock -v ~/.coder:/var/run/coder -e DEVURL_HOST="*.mycompany.com" codercom/coder:1.33.3
```

## Use an external PostgreSQL database
Expand Down Expand Up @@ -136,19 +136,61 @@ To do so:
1. Within the newly created directory, create a file named `docker-compose.yml`
that includes the following:

```yaml
version: "3.5"
services:
coder:
image: docker.io/codercom/coder:1.32.0
container_name: coderd
restart: unless-stopped
ports:
- 7080:7080/tcp
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOME}/.coder:/var/run/coder
```
```yaml
version: "3.5"
services:
coder:
image: docker.io/codercom/coder:1.33.3
container_name: coderd
restart: unless-stopped
ports:
- 7080:7080/tcp
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOME}/.coder:/var/run/coder
```

By default, Coder will create a postgres database. If you'd like to use postgres
in a separate container, use the example below:

```yaml
version: "3.5"
services:
coder:
image: docker.io/codercom/coder:1.33.3
container_name: coderd
restart: unless-stopped
ports:
- 7080:7080/tcp
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOME}/.coder:/var/run/coder
environment:
DB_EMBEDDED: ""
DB_HOST: "db"
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: "password"
DB_NAME: postgres
DB_SSL_MODE: disable
db:
container_name: postgres
image: postgres
restart: unless-stopped
ports:
- 5432:5432/tcp
networks:
- coder
environment:
POSTGRES_PASSWORD: password
volumes:
- db-data:/var/lib/postgresql/data
networks:
coder:
name: coder_network
volumes:
db-data: {}
```

1. In the terminal, navigate into the folder you created and run:

Expand Down
2 changes: 1 addition & 1 deletion setup/coder-for-docker/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ you must:
-e DB_PASSWORD="" \
-e DB_NAME=postgres \
-e DB_SSL_MODE=disable \
codercom/coder:1.28.2
codercom/coder:1.33.3
```

Coder supports client TLS certificates using `DB_SSL_MODE=verify-full`. Ensure
Expand Down
4 changes: 2 additions & 2 deletions setup/coder-for-docker/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This guide will show you how to upgrade your Coder for Docker deployment.

To upgrade, run the following command to download the resources you need,
including the latest images (ensure that you're providing the correct version
number in the command, e.g., `1.32.0`):
number in the command, e.g., `1.33.3`):

```console
docker run --rm -it \
Expand All @@ -27,7 +27,7 @@ If you use Docker Compose to run Coder, here's how to upgrade your deployment:
# ...
services:
coder:
image: docker.io/codercom/coder:1.32.0
image: docker.io/codercom/coder:1.33.3
# ...
```

Expand Down