fix docker compose

This commit is contained in:
Zikil 2024-10-31 17:18:23 +07:00
parent 03c651e910
commit f195a33f79
3 changed files with 8 additions and 6 deletions

View File

@ -13,19 +13,20 @@ RUN npm ci
COPY . .
# Собираем приложение
RUN npm run build
# RUN npm run build
CMD ["npm", "run", "start" ]
# Stage 2: Настройка production-окружения
FROM nginx:alpine
# FROM nginx:alpine
# Копируем собранные файлы из предыдущего этапа
# COPY --from=builder /app/dist /usr/share/nginx/html
# Копируем конфигурацию nginx
COPY nginx.conf /etc/nginx/conf.d/default.conf
# # Копируем конфигурацию nginx
# COPY nginx.conf /etc/nginx/conf.d/default.conf
# Открываем порт 80
EXPOSE 80
# Запускаем nginx
CMD ["nginx", "-g", "daemon off;"]
# CMD ["nginx", "-g", "daemon off;"]

View File

@ -7,6 +7,7 @@ services:
dockerfile: Dockerfile
ports:
- "80:80"
- "3000:3000"
restart: unless-stopped
# Добавьте volumes если нужно хранить данные постоянно
# volumes:

View File

@ -1,6 +1,6 @@
server {
listen 80;
server_name localhost;
server_name localhost:3000;
location / {
root /usr/share/nginx/html;