Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
services:
# db:
# image: postgres:16-alpine
# restart: always
# profiles: [ "local" ]
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres
# POSTGRES_DB: code_executor
# ports:
# - "5432:5432"
# volumes:
# - postgres_data:/var/lib/postgresql/data
# healthcheck:
# test: [ "CMD-SHELL", "pg_isready -U postgres -d code_executor" ]
# interval: 5s
# timeout: 5s
# retries: 5
db:
image: postgres:16-alpine
restart: always
profiles: [ "local" ]
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: code_executor
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d code_executor" ]
interval: 5s
timeout: 5s
retries: 5

# local-code-api:
# image: code-api:latest
# build: .
# profiles: [ "local" ]
# ports:
# - "3000:3000"
# environment:
# DATABASE_URL: ${POSTGRES_URL}
# depends_on:
# db:
# condition: service_healthy
# command: >
# sh -c "python3 -m alembic upgrade head &&
# python3 -m scripts.seed &&
# gunicorn --bind 0.0.0.0:3000 app:app"
local-code-api:
image: code-api:latest
build: .
profiles: [ "local" ]
ports:
- "3000:3000"
environment:
DATABASE_URL: ${POSTGRES_URL}
depends_on:
db:
condition: service_healthy
command: >
sh -c "python3 -m alembic upgrade head &&
gunicorn --bind 0.0.0.0:3000 app:app"

code-api:
image: code-api:latest
build: .
profiles: [ "remote" ]
ports:
- "3000:3000"
environment:
Expand Down