49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
services:
|
|
coder:
|
|
image: ghcr.io/coder/coder:latest
|
|
container_name: coder_coder
|
|
restart: "no"
|
|
env_file:
|
|
- secrets.env
|
|
environment:
|
|
- CODER_ACCESS_URL="https://coder.jafner.net"
|
|
- CODER_HTTP_ADDRESS="0.0.0.0:7080"
|
|
- CODER_PG_CONNECTION_URL="postgresql://$PGUSERNAME:$PGPASSWORD@postgres/coder"
|
|
networks:
|
|
- web
|
|
- coder
|
|
volumes:
|
|
- ${DOCKER_DATA}/coder:/home/coder/.config
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
labels:
|
|
- traefik.http.routers.coder.rule=Host(`coder.jafner.net`)
|
|
- traefik.http.routers.coder.tls.certresolver=lets-encrypt-dns01
|
|
- traefik.http.routers.coder.tls.options=tls12@file
|
|
- traefik.http.routers.coder.middlewares=securityheaders@file
|
|
#- traefik.http.services.coder.loadbalancer.server.port=1234
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
postgres:
|
|
image: postgres:16
|
|
container_name: coder_postgres
|
|
env_file:
|
|
- secrets.env
|
|
networks:
|
|
- coder
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD-SHELL",
|
|
"pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
networks:
|
|
web:
|
|
external: true
|
|
coder:
|