Files
starter/docker-compose.yml
Konstantinos Arvanitakis b16413ff9a First Commit
2026-07-03 16:42:22 +03:00

148 lines
4.5 KiB
YAML

name: ${COMPOSE_PROJECT_NAME:-boboko-starter}
services:
app:
build:
context: .
target: production
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
restart: unless-stopped
env_file: .env
environment:
DB_HOST: postgres
REDIS_HOST: valkey
REDIS_PORT: 6379
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
volumes:
- storage:/var/www/html/storage/app:rw
- logs:/var/www/html/storage/logs
- framework:/var/www/html/storage/framework
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_started
healthcheck:
test: ["CMD", "php-fpm8.5", "-t"]
interval: 5s
timeout: 5s
retries: 20
start_period: 60s
nginx:
build:
context: .
target: nginx
restart: unless-stopped
ports:
- "127.0.0.1:${APP_PORT:-8090}:80"
volumes:
- storage:/var/www/html/storage/app:ro
depends_on:
app:
condition: service_healthy
queue:
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
command: php artisan queue:work --tries=3 --max-jobs=500 --memory=256
restart: unless-stopped
env_file: .env
environment:
DB_HOST: postgres
REDIS_HOST: valkey
REDIS_PORT: 6379
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: none
OTEL_LOGS_EXPORTER: none
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
volumes:
- storage:/var/www/html/storage/app
- logs:/var/www/html/storage/logs
- framework:/var/www/html/storage/framework
depends_on:
app:
condition: service_healthy
scheduler:
image: ${COMPOSE_PROJECT_NAME:-boboko-starter}-app
command: php artisan schedule:work
restart: unless-stopped
env_file: .env
environment:
DB_HOST: postgres
REDIS_HOST: valkey
REDIS_PORT: 6379
OTEL_TRACES_EXPORTER: otlp
OTEL_METRICS_EXPORTER: none
OTEL_LOGS_EXPORTER: none
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
volumes:
- storage:/var/www/html/storage/app
- logs:/var/www/html/storage/logs
- framework:/var/www/html/storage/framework
depends_on:
app:
condition: service_healthy
postgres:
image: postgres:18-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DB_DATABASE:-boboko}
POSTGRES_USER: ${DB_USERNAME:-laravel}
POSTGRES_PASSWORD: ${DB_PASSWORD:?DB_PASSWORD is required}
volumes:
- pgdata:/var/lib/postgresql
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${DB_USERNAME:-laravel} -d ${DB_DATABASE:-boboko}",
]
interval: 5s
timeout: 5s
retries: 10
valkey:
image: valkey/valkey:7.2.13
restart: unless-stopped
command: valkey-server --appendonly yes
volumes:
- valkeydata:/data
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
restart: unless-stopped
environment:
SIGNOZ_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT}
volumes:
- ./docker/otel/collector.yml:/etc/otelcol-contrib/config.yaml:ro
stoic:
image: ghcr.io/lexx27/stoic:latest
ports:
- "127.0.0.1:${STOIC_PORT:-2727}:2727"
environment:
STOIC_CONFIG_DIR: /config/
STOIC_SECRET: ${STOIC_SECRET:?STOIC_SECRET is required}
STOIC_SSO_SECRET: ${STOIC_SSO_SECRET:?STOIC_SSO_SECRET is required}
volumes:
- ./docker/stoic/stoic_config.yml:/config/stoic_config.yml:ro
- ./resources/stoic/stoic_schemas.yml:/config/stoic_schemas.yml:ro
- ./resources/stoic/content:/content
- ./resources/stoic/media:/media
- storage:/var/www/html/storage/app
restart: unless-stopped
volumes:
pgdata:
storage:
logs:
framework:
valkeydata: