diff --git a/docker-compose.yml b/docker-compose.yml index 7ee1e39..95bcfc0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,9 @@ -version: '3.8' - services: frontend: build: context: . dockerfile: docker/frontend/Dockerfile - container_name: support-frontend + container_name: frontend restart: unless-stopped networks: - app-network @@ -14,7 +12,7 @@ services: build: context: . dockerfile: docker/backend/Dockerfile - container_name: support-backend + container_name: backend restart: unless-stopped environment: - TELEGRAM_BOT_TOKEN=7677506032:AAHEqNUr1lIUfNVbLwaWIaPeKKShsCyz3eo @@ -29,7 +27,7 @@ services: build: context: . dockerfile: docker/nginx/Dockerfile - container_name: support-nginx + container_name: nginx restart: unless-stopped ports: - "80:80" diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index e189514..9cec523 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -25,11 +25,16 @@ RUN rm -rf /usr/share/nginx/html/* COPY --from=build /app/dist/ /usr/share/nginx/html/ # Copy nginx configuration -COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/ +COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf # Ensure correct permissions RUN chown -R nginx:nginx /usr/share/nginx/html && \ - chmod -R 755 /usr/share/nginx/html + chmod -R 755 /usr/share/nginx/html && \ + chown -R nginx:nginx /var/cache/nginx && \ + chown -R nginx:nginx /var/log/nginx && \ + chown -R nginx:nginx /etc/nginx/conf.d + +USER nginx EXPOSE 80