Files
iiEasy/docker-compose.yml

53 lines
1.5 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Снаружи открыт только порт 85 (прокси). Сайт и API по http://хост:85
# Strapi и фронт доступны только внутри Docker-сети через прокси.
version: '3.8'
services:
# ПРОКСИ: единственная точка входа (порт 85)
proxy:
container_name: iieasy_proxy
image: nginx:stable-alpine
restart: always
ports:
- "85:80"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
depends_on:
- frontend
- strapi
# БЭКЕНД: Strapi (порт наружу не пробрасывается, доступ через proxy)
strapi:
container_name: iieasy_backend
build:
context: ./iiEasy
dockerfile: Dockerfile
args:
STRAPI_ADMIN_BACKEND_URL: "https://iieasy.ru"
restart: always
# Пробрасываем папку с загрузками, чтобы картинки не удалились при обновлении контейнера
volumes:
- ./iiEasy/public/uploads:/opt/app/public/uploads
- ./iiEasy/.tmp:/opt/app/.tmp
env_file:
- ./iiEasy/.env
environment:
NODE_ENV: production
# ФРОНТЕНД: статика (порт наружу не пробрасывается, доступ через proxy)
frontend:
container_name: iieasy_frontend
build:
context: .
dockerfile: Dockerfile
args:
VITE_STRAPI_URL: ""
restart: always
depends_on:
- strapi
networks:
default:
name: iieasy_network