1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

cha2524222fvdfа

This commit is contained in:
MoonTestUse1
2024-12-24 16:57:00 +06:00
parent ce4578ab17
commit a7262139d5
2 changed files with 39 additions and 18 deletions

View File

@@ -1,26 +1,14 @@
version: '3.8'
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:
build:
context: .
dockerfile: docker/frontend/Dockerfile
container_name: support-frontend
volumes:
- frontend_build:/app/dist
restart: unless-stopped
depends_on:
- backend
backend:
build:
@@ -34,9 +22,20 @@ services:
volumes:
- ./backend:/app
- sqlite_data:/app/instance
expose:
- "8000"
ports:
- "8081:8000"
nginx:
build:
context: ./docker/nginx
dockerfile: Dockerfile
container_name: support-nginx
restart: unless-stopped
ports:
- "80:80"
depends_on:
- frontend
- backend
volumes:
sqlite_data:
frontend_build:

22
docker/nginx/Dockerfile Normal file
View 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;"]