Files
KanbanGit/docker-compose.yml
Twyco afe99ea6d4
CI/CD / test_and_check_app (push) Failing after 7m26s
CI/CD / Publish immutable image (push) Skipped
feat: add containerized deployment workflow
2026-08-22 08:57:18 +02:00

90 lines
2.0 KiB
YAML

services:
web:
container_name: kanbangit-web
image: kanbangit-app:local
build:
context: .
dockerfile: Dockerfile
target: runtime
command: nginx
restart: unless-stopped
ports:
- "8080:8080"
env_file:
- .env.production
environment:
PHP_FPM_UPSTREAM: php-fpm:9000
networks:
- kanbangit-web
healthcheck:
test: ["CMD", "curl", "--fail", "--silent", "http://127.0.0.1:8080/up"]
interval: 10s
timeout: 5s
retries: 3
depends_on:
php-fpm:
condition: service_healthy
php-fpm:
container_name: kanbangit-php-fpm
image: kanbangit-app:local
build:
context: .
dockerfile: Dockerfile
target: runtime
restart: unless-stopped
env_file:
- .env.production
networks:
- kanbangit-web
- kanbangit-db
healthcheck:
test: ["CMD-SHELL", "php-fpm-healthcheck || exit 1"]
interval: 10s
timeout: 5s
retries: 3
depends_on:
mariadb:
condition: service_healthy
worker:
container_name: kanbangit-worker
image: kanbangit-app:local
build:
context: .
dockerfile: Dockerfile
target: runtime
command: php artisan queue:work --sleep=3 --tries=3 --timeout=60 --max-time=3600
restart: unless-stopped
env_file:
- .env.production
networks:
- kanbangit-db
depends_on:
mariadb:
condition: service_healthy
mariadb:
container_name: kanbangit-db
image: mariadb:11.4
restart: unless-stopped
env_file:
- .env.mariadb
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes:
- mariadb-data-production:/var/lib/mysql
networks:
- kanbangit-db
healthcheck:
test: [ "CMD", "healthcheck.sh", "--connect", "--innodb_initialized" ]
start_period: 10s
interval: 10s
timeout: 5s
retries: 3
networks:
kanbangit-db:
kanbangit-web:
volumes:
mariadb-data-production: