salutedev-test-web-app/docker-compose.yml

63 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2026-06-04 14:11:13 +03:00
services:
postgres:
image: postgres:16
container_name: motd-postgres
env_file: .env
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 15
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7
container_name: motd-redis
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
timeout: 5s
retries: 15
ports:
- '6379:6379'
app:
image: artifacts.siverov.com/library/motd-web-app
build: .
env_file: .env
container_name: motd-app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: [ "CMD", "nc", "-vz", "::1", "3000" ]
interval: 10s
timeout: 5s
retries: 15
nginx:
image: nginx:1.27-alpine
container_name: motd-nginx
ports:
- '80:80'
- '443:443'
depends_on:
app:
condition: service_started
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./.ssl/certs:/etc/nginx/certs:ro
healthcheck:
test: [ "CMD", "nc", "-vz", "::1", "80" ]
interval: 10s
timeout: 5s
retries: 15
volumes:
postgres_data: {}