Files
animethemes-server/docker-compose.beta.yml

90 lines
2.6 KiB
YAML

services:
server:
build:
context: .
dockerfile: Dockerfile
target: production
image: '${APP_IMAGE:-beta-animethemes-server:local}'
container_name: beta-animethemes-server
restart: unless-stopped
command: >
sh -c "
find /public -mindepth 1 -maxdepth 1 -exec rm -rf {} + &&
cp -r /app/public/. /public/ &&
exec php-fpm
"
ports:
- "127.0.0.1:${APP_PORT:-9001}:9000"
env_file: .env
volumes:
- laravel-storage:/app/storage
- ./public:/public
networks:
- beta-laravel-network
- beta-shared-network
extra_hosts:
- "api.beta.animethemes.moe:host-gateway"
depends_on:
redis:
condition: service_healthy
queue:
image: '${APP_IMAGE:-beta-animethemes-server:local}'
container_name: beta-animethemes-queue
restart: unless-stopped
command: php artisan queue:work --sleep=3 --tries=3 --timeout=120 --max-time=3600 --queue=default,discord
env_file: .env
volumes:
- laravel-storage:/app/storage
networks:
- beta-laravel-network
- beta-shared-network
extra_hosts:
- "api.beta.animethemes.moe:host-gateway"
depends_on:
redis:
condition: service_healthy
scheduler:
image: '${APP_IMAGE:-beta-animethemes-server:local}'
container_name: beta-animethemes-scheduler
restart: unless-stopped
command: >
sh -c '
while true; do
php artisan schedule:run --no-interaction;
sleep $((60 - $(date +%s) % 60));
done
'
env_file: .env
volumes:
- laravel-storage:/app/storage
networks:
- beta-laravel-network
- beta-shared-network
extra_hosts:
- "api.beta.animethemes.moe:host-gateway"
depends_on:
redis:
condition: service_healthy
redis:
image: 'redis:alpine'
container_name: beta-animethemes-redis
restart: unless-stopped
volumes:
- './docker-data/redis:/data'
networks:
- beta-laravel-network
healthcheck:
test:
- CMD
- redis-cli
- ping
retries: 3
timeout: 5s
networks:
beta-laravel-network:
driver: bridge
beta-shared-network:
external: true
volumes:
laravel-storage:
driver: local