add nginx container

This commit is contained in:
2026-02-16 11:36:48 +03:30
parent 6f699a5199
commit 30361d4f4a
2 changed files with 21 additions and 1 deletions

View File

@@ -17,6 +17,20 @@ services:
# networks:
# - crm_network
nginx:
image: nginx:stable-alpine3.23-perl
container_name: nginx
restart: unless-stopped
ports:
- "8000:80"
volumes:
- ./nginx/crm.conf:/etc/nginx/conf.d/default.conf
- ${LARAVEL_PROJECT_PATH}:/var/www/crm/backend
depends_on:
- laravel
networks:
- crm_network
notification_db:
image: docker.arvancloud.ir/postgres:17-alpine3.21
container_name: notification_db
@@ -56,6 +70,7 @@ services:
- "9000:9000"
volumes:
- ${LARAVEL_PROJECT_PATH}:/var/www/crm/backend
- /var/spool/asterisk/monitor:/var/www/crm/backend/storage/app/public/recordings
extra_hosts:
- "host.docker.internal:host-gateway" # Enables host DB access
environment:

View File

@@ -7,11 +7,16 @@ server {
include fastcgi_params;
fastcgi_pass laravel:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/laravel/public/index.php;
fastcgi_param SCRIPT_FILENAME /var/www/crm/backend/public/index.php;
}
location / {
proxy_pass http://nextjs:3106;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /notification {