Integrate docker to main page

This commit is contained in:
2023-02-10 06:42:07 +00:00
parent 52e922685d
commit c898bcf1d4
3 changed files with 37 additions and 24 deletions

View File

@ -18,7 +18,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass backend:9000; fastcgi_pass operadores-backend:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

View File

@ -1,53 +1,61 @@
version: '3' version: '3'
services: services:
backend-proxy: operadores-backend-proxy:
container_name: backend_proxy profiles:
- operadores
container_name: operadores_api
image: nginx image: nginx
volumes: volumes:
- ./api/:/app/ - ${OPERADORES_PATH:-.}/api/:/app/
- ./api/nginx.conf:/etc/nginx/conf.d/default.conf - ${OPERADORES_PATH:-.}/api/nginx.conf:/etc/nginx/conf.d/default.conf
- ./logs/api/:/var/log/nginx/ - ./logs/operadores/api/:/var/log/nginx/
restart: unless-stopped restart: unless-stopped
ports: ports:
- 8001:80 - 8001:80
depends_on: depends_on:
- backend - operadores-backend
backend: operadores-backend:
container_name: backend profiles:
- operadores
container_name: operadores_backend
restart: unless-stopped restart: unless-stopped
image: php image: php
build: build:
context: ./api context: ${OPERADROES_PATH:-.}/api
dockerfile: PHP.Dockerfile dockerfile: PHP.Dockerfile
env_file: .db.env env_file: ${OPERADORES_PATH:-.}/.db.env
volumes: volumes:
- ./api/:/app/ - ${OPERADORES_PATH:-.}/api/:/app/
# depends_on: # depends_on:
# - db # - db
frontend-proxy: operadores-frontend-proxy:
container_name: frontend_proxy profiles:
- operadores
container_name: operadores_ui
image: nginx image: nginx
volumes: volumes:
- ./ui/:/app/ - ${OPERADORES_PATH:-.}/ui/:/app/
- ./ui/nginx.conf:/etc/nginx/conf.d/default.conf - ${OPERADORES_PATH:-.}/ui/nginx.conf:/etc/nginx/conf.d/default.conf
- ./logs/ui/:/var/log/nginx/ - ./logs/operadores/ui/:/var/log/nginx/
restart: unless-stopped restart: unless-stopped
ports: ports:
- 8000:80 - 8000:80
depends_on: depends_on:
- frontend - operadores-frontend
frontend: operadores-frontend:
container_name: frontend profiles:
- operadores
container_name: operadores_frontend
restart: unless-stopped restart: unless-stopped
image: php:ui image: php:ui
build: build:
context: ./ui context: ${OPERADORES_PATH:-.}/ui
dockerfile: PHP.Dockerfile dockerfile: PHP.Dockerfile
env_file: .ui.env env_file: ${OPERADORES_PATH:-.}/.ui.env
volumes: volumes:
- ./ui/:/app/ - ${OPERADORES_PATH:-.}/ui/:/app/
# #
# db: # db:
# image: mariadb # image: mariadb
@ -68,3 +76,8 @@ services:
# #
#volumes: #volumes:
# database: # database:
networks:
default:
external: true
name: incoviba_network

View File

@ -13,7 +13,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
try_files $uri =404; try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass frontend:9000; fastcgi_pass operadores-frontend:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;