2022-05-12 12:59:34 -05:00
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
|
|
coder:
|
2022-07-11 12:05:05 -05:00
|
|
|
# This MUST be stable for our documentation and
|
|
|
|
# other automations.
|
|
|
|
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
|
2022-05-12 12:59:34 -05:00
|
|
|
ports:
|
|
|
|
- "7080:7080"
|
|
|
|
environment:
|
2022-05-17 15:40:13 +01:00
|
|
|
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database/${POSTGRES_DB:-coder}?sslmode=disable"
|
2023-04-18 11:44:41 -05:00
|
|
|
CODER_HTTP_ADDRESS: "0.0.0.0:7080"
|
2022-05-19 15:38:07 -05:00
|
|
|
# You'll need to set CODER_ACCESS_URL to an IP or domain
|
|
|
|
# that workspaces can reach. This cannot be localhost
|
|
|
|
# or 127.0.0.1 for non-Docker templates!
|
|
|
|
CODER_ACCESS_URL: "${CODER_ACCESS_URL}"
|
2022-09-28 16:33:36 +03:00
|
|
|
# If the coder user does not have write permissions on
|
|
|
|
# the docker socket, you can uncomment the following
|
|
|
|
# lines and set the group ID to one that has write
|
|
|
|
# permissions on the docker socket.
|
|
|
|
#group_add:
|
|
|
|
# - "998" # docker group on host
|
2022-05-17 15:40:13 +01:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
2024-12-04 12:21:54 +01:00
|
|
|
# Run "docker volume rm coder_coder_home" to reset the dev tunnel url (https://abc.xyz.try.coder.app).
|
|
|
|
# This volume is not required in a production environment - you may safely remove it.
|
|
|
|
# Coder can recreate all the files it needs on restart.
|
|
|
|
- coder_home:/home/coder
|
2022-05-12 12:59:34 -05:00
|
|
|
depends_on:
|
|
|
|
database:
|
|
|
|
condition: service_healthy
|
|
|
|
database:
|
2024-06-26 16:22:24 +01:00
|
|
|
# Minimum supported version is 13.
|
|
|
|
# More versions here: https://hub.docker.com/_/postgres
|
|
|
|
image: "postgres:16"
|
2022-06-02 09:01:45 -05:00
|
|
|
ports:
|
|
|
|
- "5432:5432"
|
2022-05-12 12:59:34 -05:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER:-username} # The PostgreSQL user (useful to connect to the database)
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} # The PostgreSQL password (useful to connect to the database)
|
|
|
|
POSTGRES_DB: ${POSTGRES_DB:-coder} # The PostgreSQL default database (automatically created at first launch)
|
|
|
|
volumes:
|
|
|
|
- coder_data:/var/lib/postgresql/data # Use "docker volume rm coder_coder_data" to reset Coder
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
[
|
|
|
|
"CMD-SHELL",
|
|
|
|
"pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}",
|
|
|
|
]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 5s
|
|
|
|
retries: 5
|
|
|
|
volumes:
|
|
|
|
coder_data:
|
2024-12-04 12:21:54 +01:00
|
|
|
coder_home:
|