add nginx container
This commit is contained in:
@@ -17,6 +17,20 @@ services:
|
|||||||
# networks:
|
# networks:
|
||||||
# - crm_network
|
# - 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:
|
notification_db:
|
||||||
image: docker.arvancloud.ir/postgres:17-alpine3.21
|
image: docker.arvancloud.ir/postgres:17-alpine3.21
|
||||||
container_name: notification_db
|
container_name: notification_db
|
||||||
@@ -56,6 +70,7 @@ services:
|
|||||||
- "9000:9000"
|
- "9000:9000"
|
||||||
volumes:
|
volumes:
|
||||||
- ${LARAVEL_PROJECT_PATH}:/var/www/crm/backend
|
- ${LARAVEL_PROJECT_PATH}:/var/www/crm/backend
|
||||||
|
- /var/spool/asterisk/monitor:/var/www/crm/backend/storage/app/public/recordings
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway" # Enables host DB access
|
- "host.docker.internal:host-gateway" # Enables host DB access
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -7,11 +7,16 @@ server {
|
|||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_pass laravel:9000;
|
fastcgi_pass laravel:9000;
|
||||||
fastcgi_index index.php;
|
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 / {
|
location / {
|
||||||
proxy_pass http://nextjs:3106;
|
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 {
|
location /notification {
|
||||||
|
|||||||
Reference in New Issue
Block a user