screenshot-to-code/docker-compose.yml
2024-05-24 09:55:42 +00:00

31 lines
649 B
YAML

services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
env_file:
- .env
# or
# environment:
#- BACKEND_PORT=7001 # if you change the port, make sure to also change the VITE_WS_BACKEND_URL at frontend/.env.local
# - OPENAI_API_KEY=your_openai_api_key
ports:
- "${BACKEND_PORT:-7001}:${BACKEND_PORT:-7001}"
command: poetry run uvicorn main:app --host 0.0.0.0 --port ${BACKEND_PORT:-7001} --workers 2
restart: always
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:5173"
restart: always