Files
myAnsuran-KIK-JPPH-/docker-compose.yml
2026-06-16 20:06:05 +08:00

45 lines
1.2 KiB
YAML

services:
app:
build:
context: .
dockerfile: docker/php-apache/Dockerfile
container_name: myansuran-app
ports:
- "8002:80"
restart: always
volumes:
- ./src:/var/www/html
- ./docker/php/custom.ini:/usr/local/etc/php/conf.d/99-custom.ini
environment:
APACHE_DOCUMENT_ROOT: /var/www/html/public
APP_ENV: local
APP_DEBUG: "true"
REDIS_HOST: shared-redis
REDIS_PORT: 6379
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- backend_net
# ── Webhook Deploy (Gitea → auto pull + migrate) ───────────────────────────
webhook:
build:
context: ./docker/webhook
container_name: myansuran-webhook
restart: always
environment:
WEBHOOK_SECRET: ${WEBHOOK_SECRET}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /root/.ssh:/root/.ssh:ro
- ./docker/webhook/hooks.json:/etc/webhook/hooks.json:ro
- ./deploy.sh:/deploy.sh:ro
- .:/srv/myansuran
command: -hooks=/etc/webhook/hooks.json -template -verbose
networks:
- backend_net
networks:
backend_net:
name: backend_net
external: true