64 lines
1.4 KiB
YAML
64 lines
1.4 KiB
YAML
services:
|
|
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: ff_postgres
|
|
environment:
|
|
POSTGRES_DB: ${PG_DB}
|
|
POSTGRES_USER: ${PG_USER}
|
|
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./postgres/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${PG_USER} -d ${PG_DB}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api:
|
|
build: .
|
|
container_name: ff_api
|
|
ports:
|
|
- "${API_PORT:-3000}:3000"
|
|
environment:
|
|
PG_HOST: postgres
|
|
PG_PORT: 5432
|
|
PG_DB: ${PG_DB}
|
|
PG_USER: ${PG_USER}
|
|
PG_PASSWORD: ${PG_PASSWORD}
|
|
API_PORT: ${API_PORT:-3000}
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
sync:
|
|
build: ./sync
|
|
container_name: ff_sync
|
|
ports:
|
|
- "3001:3001"
|
|
env_file:
|
|
- .env.docker
|
|
environment:
|
|
PG_HOST: postgres
|
|
PG_PORT: "5432"
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
# Tunnel sortant vers le serveur Hostinger (aucun port entrant requis)
|
|
frpc:
|
|
image: snowdreamtech/frpc:latest
|
|
container_name: ff_frpc
|
|
volumes:
|
|
- ./frpc.toml:/etc/frp/frpc.toml:ro
|
|
depends_on:
|
|
- api
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|