2024-12-02 20:35:04 +00:00
# ignore: true
2024-10-03 19:10:22 +00:00
# documentation: https://coder.com/docs
# slogan: Coder is an open-source platform for creating and managing cloud development environments on your infrastructure, with the tools and IDEs your developers already love.
2025-08-17 16:23:57 +00:00
# category: devtools
2024-10-03 19:10:22 +00:00
# tags: coder,development,environment,self-hosted,postgres
# logo: svgs/coder.svg
# port: 7080
services :
coder :
2024-10-28 12:15:03 +00:00
image : ghcr.io/coder/coder:latest
2024-10-03 19:10:22 +00:00
environment :
2025-08-10 08:10:22 +00:00
- SERVICE_URL_CODER_7080
2024-10-28 12:15:03 +00:00
- CODER_PG_CONNECTION_URL=postgresql://${SERVICE_USER_POSTGRES}:${SERVICE_PASSWORD_POSTGRES}@coder-database/${POSTGRES_DB:-coder-db}?sslmode=disable
- CODER_HTTP_ADDRESS=0.0.0.0:7080
2025-08-10 08:10:22 +00:00
- CODER_ACCESS_URL=${SERVICE_URL_CODER}
2024-10-03 19:10:22 +00:00
volumes :
2024-10-28 12:15:03 +00:00
- /var/run/docker.sock:/var/run/docker.sock
2024-10-03 19:10:22 +00:00
depends_on :
2024-10-28 12:15:03 +00:00
coder-database :
2024-10-03 19:10:22 +00:00
condition : service_healthy
healthcheck :
test :
- CMD
- wget
- "-q"
- "--spider"
- "http://localhost:7080"
interval : 5s
timeout : 20s
retries : 10
2024-10-28 12:15:03 +00:00
coder-database :
image : postgres:16.4-alpine
2024-10-03 19:10:22 +00:00
environment :
2024-10-28 12:15:03 +00:00
POSTGRES_USER : "${SERVICE_USER_POSTGRES}"
POSTGRES_PASSWORD : "${SERVICE_PASSWORD_POSTGRES}"
POSTGRES_DB : "${POSTGRES_DB:-coder-db}"
2024-10-03 19:10:22 +00:00
volumes :
2024-10-28 12:15:03 +00:00
- coder-postgres-data:/var/lib/postgresql/data
2024-10-03 19:10:22 +00:00
healthcheck :
test :
- CMD-SHELL
- "pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}"
interval : 5s
timeout : 5s
retries : 5