version: '3.8' services: postgres: image: postgres:18-alpine network_mode: service:elemes-ts environment: - POSTGRES_DB=${POSTGRES_DB:-elemes} - POSTGRES_USER=${POSTGRES_USER:-elemes} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} volumes: - postgres-data:/var/lib/postgresql healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-elemes} -d ${POSTGRES_DB:-elemes}"] interval: 5s timeout: 3s retries: 20 start_period: 10s restart: unless-stopped depends_on: - elemes-ts elemes-ts: image: docker.io/tailscale/tailscale:latest hostname: ${ELEMES_HOST} environment: - TS_AUTHKEY=${TS_AUTHKEY} - TS_SERVE_CONFIG=/config/lms-tail.json - TS_STATE_DIR=/var/lib/tailscale - TS_USERSPACE=true volumes: - ../state:/var/lib/tailscale - ./config:/config - /dev/net/tun:/dev/net/tun cap_add: - net_admin - sys_module restart: unless-stopped env_file: - ../.env elemes: build: . image: lms-backend:latest network_mode: service:elemes-ts volumes: - ../content:/app/content:ro - ../assets:/app/assets:ro env_file: - ../.env environment: - COMPILER_WORKER_URL=http://127.0.0.1:8080/execute - COMPILER_WORKER_BASE_URL=http://127.0.0.1:8080 - VELXIO_COMPILER_URL=http://127.0.0.1:80/api/compile/ - DATABASE_URL=${DATABASE_URL} - TOKEN_PEPPER=${TOKEN_PEPPER} - STORAGE_BACKEND=${STORAGE_BACKEND:-postgresql} restart: unless-stopped depends_on: - elemes-ts - postgres # production command: gunicorn --config gunicorn.conf.py "app:create_app()" # debug # command: python app.py compiler-worker: build: ./compiler_worker image: lms-compiler-worker:latest runtime: runsc # Enable gVisor network_mode: service:elemes-ts restart: unless-stopped depends_on: - elemes-ts elemes-frontend: build: ./frontend image: lms-frontend:latest # ports: # - 3000:3000 network_mode: service:elemes-ts environment: - ORIGIN=${ORIGIN:-http://localhost:3000} - API_BACKEND=http://127.0.0.1:5000 - PUBLIC_APP_BAR_TITLE=${APP_BAR_TITLE} - PUBLIC_COPYRIGHT_TEXT=${COPYRIGHT_TEXT} - PUBLIC_PAGE_TITLE_SUFFIX=${PAGE_TITLE_SUFFIX} - PUBLIC_CURSOR_OFFSET_Y=${CURSOR_OFFSET_Y:-50} restart: unless-stopped depends_on: - elemes-ts - elemes velxio: image: lms-velxio:latest build: context: ./velxio dockerfile: Dockerfile.standalone args: VITE_BASE_PATH: /velxio/ VITE_API_BASE: /velxio/api network_mode: service:elemes-ts environment: - SECRET_KEY=embed-only-no-auth-needed - DATABASE_URL=sqlite+aiosqlite:////app/data/velxio.db - DATA_DIR=/app/data restart: unless-stopped depends_on: - elemes-ts volumes: - velxio-data:/app/data - velxio-arduino-libs:/root/.arduino15 flowchart: build: ./flowchart image: lms-flowchart:latest network_mode: service:elemes-ts restart: unless-stopped depends_on: - elemes-ts volumes: postgres-data: velxio-data: velxio-arduino-libs: