52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
|
|
# GnommoEditor — Production
|
||
|
|
# Usage: ./deploy.sh
|
||
|
|
# Prerequisites:
|
||
|
|
# docker network create gnommo-proxy (run once on the server — shared with gnommoweb)
|
||
|
|
# gnommoweb must be running (shares gnommo-db postgres and gnommo-minio)
|
||
|
|
|
||
|
|
services:
|
||
|
|
backend:
|
||
|
|
build:
|
||
|
|
context: ./backend
|
||
|
|
dockerfile: Dockerfile
|
||
|
|
container_name: gnommoeditor-backend
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
NODE_ENV: production
|
||
|
|
PORT: 3001
|
||
|
|
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@gnommo-db:5432/${POSTGRES_DB}
|
||
|
|
INGEST_API_KEY: ${INGEST_API_KEY}
|
||
|
|
JWT_SECRET: ${JWT_SECRET}
|
||
|
|
CORS_ORIGIN: https://${EDITOR_DOMAIN}
|
||
|
|
MINIO_ENDPOINT: http://gnommo-minio:9000
|
||
|
|
MINIO_PUBLIC_URL: https://glitch.university/media
|
||
|
|
MINIO_BUCKET: glitch-university
|
||
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
||
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
||
|
|
expose:
|
||
|
|
- "3001"
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
- gnommo-proxy
|
||
|
|
|
||
|
|
frontend:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.frontend
|
||
|
|
args:
|
||
|
|
VITE_GNOMMOWEB_URL: ${VITE_GNOMMOWEB_URL}
|
||
|
|
container_name: gnommoeditor-frontend
|
||
|
|
restart: unless-stopped
|
||
|
|
expose:
|
||
|
|
- "80"
|
||
|
|
depends_on:
|
||
|
|
- backend
|
||
|
|
networks:
|
||
|
|
- default
|
||
|
|
- gnommo-proxy
|
||
|
|
|
||
|
|
networks:
|
||
|
|
default: {}
|
||
|
|
gnommo-proxy:
|
||
|
|
external: true
|