mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Merge remote changes and resolve conflicts
This commit is contained in:
@@ -9,10 +9,9 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
- "443:443"
|
|
||||||
volumes:
|
volumes:
|
||||||
- certbot-etc:/etc/letsencrypt:ro
|
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
- webroot:/var/www/html
|
- ./docker/nginx/conf.d:/etc/nginx/conf.d:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@@ -28,22 +27,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./backend:/app
|
- ./backend:/app
|
||||||
- sqlite_data:/app/instance
|
- sqlite_data:/app/instance
|
||||||
expose:
|
ports:
|
||||||
- "8000"
|
- "8000:8000"
|
||||||
|
|
||||||
certbot:
|
|
||||||
image: certbot/certbot
|
|
||||||
container_name: certbot
|
|
||||||
volumes:
|
|
||||||
- certbot-etc:/etc/letsencrypt
|
|
||||||
- certbot-var:/var/lib/letsencrypt
|
|
||||||
- webroot:/var/www/html
|
|
||||||
depends_on:
|
|
||||||
- frontend
|
|
||||||
command: certonly --webroot --webroot-path=/var/www/html --email admin@itformhelp.ru --agree-tos --no-eff-email --force-renewal --staging -d itformhelp.ru -d www.itformhelp.ru
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
sqlite_data:
|
sqlite_data:
|
||||||
certbot-etc:
|
|
||||||
certbot-var:
|
|
||||||
webroot:
|
|
@@ -2,7 +2,7 @@ FROM node:18-alpine as build
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files from frontend directory
|
||||||
COPY frontend/package*.json ./
|
COPY frontend/package*.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
@@ -14,17 +14,16 @@ RUN npm run build
|
|||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
|
|
||||||
# Remove default nginx config
|
|
||||||
RUN rm /etc/nginx/conf.d/default.conf
|
|
||||||
|
|
||||||
# Copy built files
|
# Copy built files
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Create nginx config directory
|
||||||
|
RUN mkdir -p /etc/nginx/conf.d
|
||||||
|
|
||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
|
||||||
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
# Create required directories
|
# Create required directories and set permissions
|
||||||
RUN mkdir -p /var/cache/nginx \
|
RUN mkdir -p /var/cache/nginx \
|
||||||
/var/cache/nginx/client_temp \
|
/var/cache/nginx/client_temp \
|
||||||
/var/cache/nginx/proxy_temp \
|
/var/cache/nginx/proxy_temp \
|
||||||
@@ -32,9 +31,14 @@ RUN mkdir -p /var/cache/nginx \
|
|||||||
/var/cache/nginx/uwsgi_temp \
|
/var/cache/nginx/uwsgi_temp \
|
||||||
/var/cache/nginx/scgi_temp \
|
/var/cache/nginx/scgi_temp \
|
||||||
/var/run \
|
/var/run \
|
||||||
/etc/letsencrypt \
|
&& chmod 777 /var/cache/nginx \
|
||||||
/var/www/html
|
/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
|
||||||
|
|
||||||
EXPOSE 80 443
|
# Remove user directive from nginx config
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
@@ -19,4 +19,4 @@ RUN mkdir -p /var/cache/nginx \
|
|||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
@@ -1,5 +1,6 @@
|
|||||||
user nginx;
|
user nginx;
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
|
|
||||||
error_log /var/log/nginx/error.log notice;
|
error_log /var/log/nginx/error.log notice;
|
||||||
pid /var/run/nginx.pid;
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
@@ -16,8 +17,9 @@ http {
|
|||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
sendfile on;
|
sendfile on;
|
||||||
keepalive_timeout 65;
|
keepalive_timeout 65;
|
||||||
|
|
||||||
include /etc/nginx/conf.d/*.conf;
|
include /etc/nginx/conf.d/*.conf;
|
||||||
}
|
}
|
Reference in New Issue
Block a user