Files
Messenger/deploy/docker-compose.yml
T
vantablackTea 1a669c948a
CI / Go (build + vet + test) (push) Successful in 10m49s
CI / Web (build + lint) (push) Successful in 10m31s
first commit. added CI, Docker compose, blank client and server. used unit tests, they pass
2026-09-05 01:04:12 +03:00

36 lines
922 B
YAML

services:
api:
build:
context: .
dockerfile: Dockerfile
image: messenger/api:latest
restart: unless-stopped
environment:
MESSENGER_ENV: ${MESSENGER_ENV:-production}
MESSENGER_HTTP_ADDR: ":8080"
MESSENGER_ALLOWED_ORIGINS: ${MESSENGER_ALLOWED_ORIGINS:-}
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-messenger}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-messenger}
POSTGRES_DB: ${POSTGRES_DB:-messenger}
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-messenger} -d ${POSTGRES_DB:-messenger}"]
interval: 5s
timeout: 3s
retries: 10
volumes:
pgdata: