Files
ntspi-app/docker-compose.yml
T
F4ilji c01016a154 Migrate backend to Porto architecture and fix minor bugs
- Fully transitioned the backend to the Porto architectural pattern
- Improved code organization and maintainability
- Fixed minor bugs and inconsistencies
2025-05-12 08:47:43 +05:00

75 lines
1.5 KiB
YAML

version: '3'
services:
webserver:
image: nginx:1.27.2
volumes:
- ./:/var/www
- ./_docker/nginx/${NGINX_ENV}/conf.d/:/etc/nginx/conf.d/
ports:
- "80:80"
container_name: ntspi-nginx
restart: always
depends_on:
- app
env_file:
- .env
app:
build:
context: .
dockerfile: _docker/app/Dockerfile
volumes:
- ./:/var/www
container_name: ntspi-php
restart: always
ports:
- '5173'
depends_on:
db:
condition: service_healthy
php-queue-worker:
restart: always
build:
context: .
dockerfile: _docker/app/Dockerfile
volumes:
- ./:/var/www
container_name: ntspi-php-queue
command: php artisan queue:work --tries=3 --timeout=90 --sleep=3
depends_on:
db:
condition: service_healthy
db:
image: mysql:8.0
restart: always
container_name: ntspi-db
volumes:
- "./sourcefiles/mysql:/var/lib/mysql"
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=ntspi_db
- MYSQL_USER=admin
- MYSQL_PASSWORD=secret
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
timeout: 10s
retries: 10
redis-cache:
image: redis:7.4.2
restart: always
container_name: ntspi-cache-service
ports:
- "6379:6379"
command: redis-server --save 20 1 --loglevel warning
volumes:
- cache:/data
volumes:
cache:
driver: local