155 lines
3.5 KiB
YAML
155 lines
3.5 KiB
YAML
x-env_file: &env
|
|
- path: .env
|
|
required: true
|
|
- path: .env.local
|
|
required: false
|
|
|
|
x-restart: &default_restart
|
|
restart: unless-stopped
|
|
|
|
name: aviation
|
|
services:
|
|
nginx:
|
|
image: gitea.bensherriff.com/bsherriff/aviation-nginx:latest
|
|
container_name: aviation-nginx
|
|
build:
|
|
context: .
|
|
dockerfile: nginx/Dockerfile
|
|
env_file: *env
|
|
environment:
|
|
SSL_CERT_PATH: /etc/nginx/ssl/localhost.crt
|
|
SSL_CERT_KEY_PATH: /etc/nginx/ssl/localhost.key
|
|
ports:
|
|
- "${NGINX_HTTP_PORT:-8080}:80"
|
|
- "${NGINX_HTTPS_PORT:-8443}:443"
|
|
volumes:
|
|
- ./ssl:/etc/nginx/ssl/
|
|
networks:
|
|
- web
|
|
<<: *default_restart
|
|
|
|
postgres:
|
|
image: gitea.bensherriff.com/homelab/postgis:17.4
|
|
container_name: aviation-postgres
|
|
env_file: *env
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
volumes:
|
|
- postgres:/var/lib/postgresql/data
|
|
- postgres_logs:/var/log
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
profiles:
|
|
- backend
|
|
<<: *default_restart
|
|
|
|
valkey:
|
|
image: valkey/valkey:8.1.3
|
|
container_name: aviation-valkey
|
|
volumes:
|
|
- valkey:/data
|
|
ports:
|
|
- "${VALKEY_PORT:-6379}:6379"
|
|
healthcheck:
|
|
test: [ "CMD", "valkey-cli", "--raw", "incr", "ping" ]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
profiles:
|
|
- backend
|
|
<<: *default_restart
|
|
|
|
minio:
|
|
image: minio/minio:RELEASE.2025-07-23T15-54-02Z
|
|
container_name: aviation-minio
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
MINIO_BROWSER_REDIRECT_URL: ${MINIO_BROWSER_REDIRECT_URL}
|
|
MINIO_BROWSER_LOGIN_ANIMATION: false
|
|
volumes:
|
|
- minio:/data
|
|
ports:
|
|
- "${MINIO_PORT:-9000}:9000"
|
|
- "${MINIO_INTERNAL_PORT:-9001}:9001"
|
|
profiles:
|
|
- backend
|
|
command: server --console-address ":9001" /data
|
|
<<: *default_restart
|
|
|
|
api:
|
|
image: gitea.bensherriff.com/bsherriff/aviation-api:latest
|
|
container_name: aviation-api
|
|
build:
|
|
context: .
|
|
dockerfile: crates/api/Dockerfile
|
|
env_file: *env
|
|
environment:
|
|
SSL_CA_PATH: /ssl/ca.pem
|
|
API_PORT: 5000
|
|
POSTGRES_HOST: aviation-postgres
|
|
POSTGRES_PORT: 5432
|
|
VALKEY_HOST: aviation-valkey
|
|
VALKEY_PORT: 6379
|
|
MINIO_HOST: aviation-minio
|
|
MINIO_PORT: 9000
|
|
TEMPLATE_DIR: /templates
|
|
volumes:
|
|
- ./ssl:/ssl
|
|
- ./templates:/templates
|
|
ports:
|
|
- "${API_PORT:-5000}:5000"
|
|
depends_on:
|
|
- postgres
|
|
- valkey
|
|
- minio
|
|
profiles:
|
|
- api
|
|
<<: *default_restart
|
|
|
|
scheduler:
|
|
image: gitea.bensherriff.com/bsherriff/aviation-scheduler:latest
|
|
container_name: aviation-scheduler
|
|
build:
|
|
context: .
|
|
dockerfile: crates/scheduler/Dockerfile
|
|
env_file: *env
|
|
environment:
|
|
POSTGRES_HOST: aviation-postgres
|
|
POSTGRES_PORT: 5432
|
|
depends_on:
|
|
- postgres
|
|
profiles:
|
|
- api
|
|
<<: *default_restart
|
|
|
|
mailpit:
|
|
image: axllent/mailpit
|
|
container_name: mailpit
|
|
environment:
|
|
MP_MAX_MESSAGES: 5000
|
|
MP_DATABASE: /data/mailpit.db
|
|
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
|
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
|
ports:
|
|
- "${MAILPIT_WEB_PORT:-8025}:8025"
|
|
- "${MAILPIT_SMTP_PORT:-1025}:1025"
|
|
volumes:
|
|
- mailpit:/data
|
|
profiles:
|
|
- dev
|
|
<<: *default_restart
|
|
|
|
volumes:
|
|
postgres:
|
|
postgres_logs:
|
|
valkey:
|
|
minio:
|
|
mailpit:
|
|
|
|
networks:
|
|
web:
|
|
driver: bridge
|