mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
cha2524222fvdfа
This commit is contained in:
@@ -1,26 +1,14 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
nginx:
|
|
||||||
image: nginx:alpine
|
|
||||||
container_name: support-nginx
|
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
volumes:
|
|
||||||
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
||||||
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
|
|
||||||
- frontend_build:/usr/share/nginx/html
|
|
||||||
depends_on:
|
|
||||||
- frontend
|
|
||||||
- backend
|
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: docker/frontend/Dockerfile
|
dockerfile: docker/frontend/Dockerfile
|
||||||
container_name: support-frontend
|
container_name: support-frontend
|
||||||
volumes:
|
restart: unless-stopped
|
||||||
- frontend_build:/app/dist
|
depends_on:
|
||||||
|
- backend
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
build:
|
build:
|
||||||
@@ -34,9 +22,20 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./backend:/app
|
- ./backend:/app
|
||||||
- sqlite_data:/app/instance
|
- sqlite_data:/app/instance
|
||||||
expose:
|
ports:
|
||||||
- "8000"
|
- "8081:8000"
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: ./docker/nginx
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: support-nginx
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
depends_on:
|
||||||
|
- frontend
|
||||||
|
- backend
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sqlite_data:
|
sqlite_data:
|
||||||
frontend_build:
|
|
||||||
|
22
docker/nginx/Dockerfile
Normal file
22
docker/nginx/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
# Copy configuration files
|
||||||
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
|
COPY conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Create required directories and set permissions
|
||||||
|
RUN mkdir -p /var/cache/nginx \
|
||||||
|
/var/cache/nginx/client_temp \
|
||||||
|
/var/cache/nginx/proxy_temp \
|
||||||
|
/var/cache/nginx/fastcgi_temp \
|
||||||
|
/var/cache/nginx/uwsgi_temp \
|
||||||
|
/var/cache/nginx/scgi_temp \
|
||||||
|
/var/run \
|
||||||
|
&& chmod -R 755 /var/cache/nginx \
|
||||||
|
&& chmod -R 755 /etc/nginx \
|
||||||
|
&& chown -R nginx:nginx /var/cache/nginx \
|
||||||
|
&& chown -R nginx:nginx /etc/nginx
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
Reference in New Issue
Block a user