dchat/docker-compose.yml

60 lines
1.2 KiB
YAML

version: "3"
services:
bot:
image: git.hhhammer.de/hamburghammer/dchat/bot:latest
env_file:
- .env
build:
dockerfile: Containerfile
context: .
target: bot
restart: unless-stopped
user: 1000:1000
depends_on:
- db
- migration
environment:
- JDK_JAVA_OPTIONS="--enable-preview"
web:
image: git.hhhammer.de/hamburghammer/dchat/web:latest
env_file:
- .env
build:
dockerfile: Containerfile
context: .
target: web
restart: unless-stopped
user: 1000:1000
depends_on:
- db
- migration
ports:
- 8080:8080
migration:
image: git.hhhammer.de/hamburghammer/dchat/migration:latest
env_file:
- .env
build:
dockerfile: Containerfile
context: .
target: migration
user: 1000:1000
depends_on:
- db
db:
image: docker.io/postgres:15-alpine
env_file:
- .env
restart: unless-stopped
volumes:
- ./data/postgres:/var/lib/postgresql/data:rw
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", $POSTGRES_DB ]
interval: 10s
timeout: 5s
retries: 5
start_period: 60s