Coder with Portainer and NGINX Proxy Manager on a VM #22249
-
|
I will use Coder on a VM with portainer and the NGNINX Proxy Manager. Can someone explain to me why I am receiving these error messages? coder-coder-1 coder-database-1 Here is my docker-compose.yml file. I added: I tried Postgres 18 without access. The eventlog from Portainer shows this error messages every second: services:
coder:
# This MUST be stable for our documentation and
# other automations.
image: ${CODER_REPO:-ghcr.io/coder/coder}:${CODER_VERSION:-latest}
restart: unless-stopped
ports:
- "7080:7080"
environment:
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database/${POSTGRES_DB:-coder}?sslmode=disable"
CODER_HTTP_ADDRESS: "0.0.0.0:7080"
# 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}
# 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:
- "991" # docker group on host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# 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
depends_on:
database:
condition: service_healthy
database:
# Minimum supported version is 13.
# More versions here: https://hub.docker.com/_/postgres
image: "postgres:17"
restart: unless-stopped
# Uncomment the next two lines to allow connections to the database from outside the server.
# ports:
# - "5432:5432"
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)
CODER_TELEMETRY_ENABLE: false
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:
coder_home:
|
Beta Was this translation helpful? Give feedback.
Answered by
joergklein
Mar 24, 2026
Replies: 1 comment
-
|
I had some erros in the docker-compose.yml This works for me. services:
database:
image: postgres:${POSTGRES_VERSION}
container_name: coder-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_SHARED_BUFFERS: ${POSTGRES_SHARED_BUFFERS:-2GB}
POSTGRES_WORK_MEM: ${POSTGRES_WORK_MEM:-128MB}
POSTGRES_MAINTENANCE_WORK_MEM: ${POSTGRES_MAINTENANCE_WORK_MEM:-1GB}
POSTGRES_MAX_CONNECTIONS: ${POSTGRES_MAX_CONNECTIONS:-300}
volumes:
- coder_db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $POSTGRES_USER -d $POSTGRES_DB"]
interval: 30s
timeout: 10s
retries: 5
start_period: 20s
networks:
- coder_network
logging:
driver: json-file
options:
max-size: "5m"
max-file: "2"
coder:
image: ghcr.io/coder/coder:${CODER_VERSION}
container_name: coder
restart: unless-stopped
depends_on:
database:
condition: service_healthy
ports:
- "7080:7080" # fest codierter Port
environment:
CODER_HTTP_ADDRESS: "0.0.0.0:7080"
CODER_ACCESS_URL: ${CODER_ACCESS_URL}
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@database/${POSTGRES_DB}?sslmode=disable"
CODER_LOG_LEVEL: ${CODER_LOG_LEVEL:-warn}
CODER_LOG_FORMAT: ${CODER_LOG_FORMAT:-text}
CODER_TELEMETRY_ENABLE: ${CODER_TELEMETRY_ENABLE:-false}
group_add:
- "${DOCKER_GID:-991}"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- coder_home:/home/coder
networks:
- coder_network
security_opt:
- no-new-privileges:true
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
volumes:
coder_db:
coder_home:
networks:
coder_network:
driver: bridge |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joergklein
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had some erros in the docker-compose.yml
This works for me.