Files
decomp.me/docker-compose.yaml

67 lines
1.7 KiB
YAML

version: '2'
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: decompme
POSTGRES_PASSWORD: decompme
ports:
- "5432:5432"
volumes:
- ./postgres:/var/lib/postgresql/data
backend:
build:
context: backend
args:
ENABLE_GBA_SUPPORT: "YES"
ENABLE_N64_SUPPORT: "YES"
# dont install wine32 etc by default
ENABLE_NDS_SUPPORT: "NO"
ENABLE_PS1_SUPPORT: "NO"
ENABLE_WII_GC_SUPPORT: "NO"
# dont install clang by default
ENABLE_SWITCH_SUPPORT: "NO"
cap_drop:
- all
cap_add:
- setuid
- setgid
- setfcap
environment:
DATABASE_URL: psql://decompme:decompme@postgres:5432/decompme
SECRET_KEY: "django-insecure-nm#!8%z$$hc0wwi#m_*l9l)=m*6gs4&o_^-e5b5vj*k05&yaqc1"
DEBUG: "on"
ALLOWED_HOSTS: "backend,localhost,127.0.0.1"
USE_SANDBOX_JAIL: "on"
SANDBOX_DISABLE_PROC: "true"
COMPILER_BASE_PATH: /compilers
LOCAL_FILE_DIR: /local_files
ports:
- "8000:8000"
security_opt:
- apparmor=unconfined
- seccomp=unconfined
volumes:
- ./backend:/backend
- ./local_files:/local_files
tmpfs:
# Use a separate tmpfs to prevent a rogue jailed process
# from filling /tmp on the parent container
- /sandbox/tmp:uid=1000,gid=1000,size=64M,mode=0700
frontend:
build: frontend
environment:
API_BASE: http://localhost/api
INTERNAL_API_BASE: http://backend:8000/api
ports:
- "8080:8080"
volumes:
- ./frontend:/frontend
- .env:/.env
nginx:
image: nginx:1.22-alpine
ports:
- "80:80"
volumes:
- ./nginx:/etc/nginx/conf.d