services: mongo: image: mongo:latest ports: - "127.0.0.1:27017:27017" environment: MONGO_INITDB_ROOT_USERNAME: forms-backend MONGO_INITDB_ROOT_PASSWORD: forms-backend MONGO_INITDB_DATABASE: pydis_forms snekbox: image: ghcr.io/python-discord/snekbox:latest ipc: none ports: - "127.0.0.1:8060:8060" privileged: true redis: image: redis:latest ports: - "127.0.0.1:6379:6379" backend: image: ghcr.io/python-discord/forms-backend command: ["uvicorn", "--reload", "--host", "0.0.0.0", "backend:app"] depends_on: - mongo - snekbox - redis ports: - "127.0.0.1:8000:8000" environment: - DATABASE_URL=mongodb://forms-backend:forms-backend@mongo:27017 - SNEKBOX_URL=http://snekbox:8060/eval - OAUTH2_CLIENT_ID - OAUTH2_CLIENT_SECRET - ALLOWED_URL - DEBUG=true - PRODUCTION=false - REDIS_URL=redis://redis:6379 env_file: - .env frontend: build: context: . dockerfile: Dockerfile depends_on: - backend volumes: - .:/app:ro - /app/node_modules # Ensure dependencies do not collide with a user's local install ports: - "3000:3000" environment: - BACKEND_URL=http://localhost:8000/ env_file: - .env