Files
runners-calendar/docker-compose.stack.yml
Vaka.pro 007d899721
Some checks failed
CI / build-and-test (pull_request) Has been cancelled
chore: drop agent/plan docs, unify .env for Docker stack
- Remove PLAN/agent instruction files; single root .env.example for DB + API
- Stack compose uses env_file .env; delete stack env example duplicate
- Refresh README, backend docs, API doc; trim gitignore/dockerignore

Made-with: Cursor
2026-04-07 00:30:29 +03:00

52 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.
# Backend + frontend в сети с уже поднятым PostgreSQL (external network).
#
# Подготовка: из корня репозитория скопируйте .env.example → .env и задайте DB_*
# и CORS_ORIGIN (для фронта на :3033 — http://localhost:3033).
#
# Сеть (имя должно существовать, как у вашего Postgres):
# docker network ls
#
# Запуск:
# docker compose -f docker-compose.stack.yml up -d --build
#
# Миграции и seed (один раз после появления БД):
# docker compose -f docker-compose.stack.yml exec backend node dist/migrate.js
# docker compose -f docker-compose.stack.yml exec backend node dist/seed.js
#
# NPM: проброс на порт 3033. Браузер ходит на /api → nginx во фронте → backend:3000.
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: runners-calendar-backend
env_file:
- .env
environment:
- PORT=3000
ports:
- "3001:3000"
restart: unless-stopped
networks:
- postgres_default
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
args:
VITE_API_BASE_URL: /api
container_name: runners-calendar-frontend
depends_on:
- backend
ports:
- "3033:80"
restart: unless-stopped
networks:
- postgres_default
networks:
postgres_default:
external: true