Files
weirsoe-party-protocol/docker-compose.yml
Asger Geel Weirsøe a81bc1250c
Some checks failed
CI / test-and-quality (push) Failing after 4m4s
Big visual overhaul docker compsoe file etc
2026-03-23 14:11:30 +01:00

83 lines
2.1 KiB
YAML

services:
app:
build:
context: .
dockerfile: Dockerfile
command: sh /app/scripts/docker_dev_entrypoint.sh
env_file:
- infra/env/.env.dev.example
environment:
DB_HOST: db
DB_PORT: "3306"
CHANNEL_REDIS_HOST: redis
CHANNEL_REDIS_PORT: "6379"
USE_SPA_UI: ${USE_SPA_UI:-false}
WPP_SPA_ASSET_BASE: ${WPP_SPA_ASSET_BASE:-http://localhost:4200/browser}
WPP_SPA_ASSET_VERSION: ${WPP_SPA_ASSET_VERSION:-dev}
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test:
- CMD
- python
- -c
- import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://127.0.0.1:8000/healthz').status == 200 else 1)
interval: 5s
timeout: 5s
retries: 20
start_period: 15s
ports:
- "${APP_PORT:-8000}:8000"
volumes:
- .:/app
stdin_open: true
tty: true
db:
image: mysql:8.4
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_DATABASE: wpp_dev
MYSQL_USER: wpp_dev
MYSQL_PASSWORD: wpp_dev
MYSQL_ROOT_PASSWORD: wpp_root
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -p$$MYSQL_ROOT_PASSWORD --silent"]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
ports:
- "${DB_FORWARD_PORT:-3307}:3306"
volumes:
- mysql_data:/var/lib/mysql
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"]
ports:
- "${REDIS_FORWARD_PORT:-6380}:6379"
volumes:
- redis_data:/data
spa-assets:
profiles: ["spa"]
image: node:22-alpine
working_dir: /workspace/frontend/angular
command: sh -c "npm ci && npm run build && node /workspace/scripts/serve_static_dir.mjs dist/wpp-angular-shell 4200 http://app:8000"
ports:
- "${SPA_PORT:-4200}:4200"
volumes:
- .:/workspace
- spa_node_modules:/workspace/frontend/angular/node_modules
volumes:
mysql_data:
redis_data:
spa_node_modules: