73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
services:
|
|
nginx:
|
|
image: docker.arvancloud.ir/nginx:stable-alpine3.23-perl
|
|
container_name: nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ./nginx/payment.conf:/etc/nginx/conf.d/default.conf
|
|
- ${BACKEND_PATH}:/var/www/${PROJECT_NAME}
|
|
networks:
|
|
- payment
|
|
|
|
redis:
|
|
image: docker.arvancloud.ir/redis:8.6.0-alpine3.23
|
|
container_name: redis
|
|
restart: unless-stopped
|
|
tty: true
|
|
networks:
|
|
- payment
|
|
|
|
postgres:
|
|
image: docker.arvancloud.ir/postgres:18.3-alpine3.23
|
|
container_name: pgsql
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8091:5432"
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB}
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- payment-db:/var/lib/postgresql/data
|
|
networks:
|
|
- payment
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
backend:
|
|
build:
|
|
context: ${BACKEND_PATH}
|
|
dockerfile: Dockerfile.production
|
|
container_name: laravel
|
|
tty: true
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
volumes:
|
|
- ${BACKEND_PATH}:/var/www/${PROJECT_NAME}
|
|
depends_on:
|
|
- postgres
|
|
networks:
|
|
- payment
|
|
logging:
|
|
driver: "syslog"
|
|
options:
|
|
syslog-address: "tcp://host.docker.internal:514"
|
|
tag: "laravel-backend"
|
|
syslog-facility: "daemon"
|
|
max-size: "10m"
|
|
mem_limit: 512M
|
|
cpus: 1
|
|
|
|
volumes:
|
|
payment-db:
|
|
driver: local
|
|
|
|
networks:
|
|
payment:
|
|
driver: bridge |