-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
40 lines (38 loc) · 1.45 KB
/
docker-compose.local.yml
File metadata and controls
40 lines (38 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# docker-compose.local.yml - Run in Docker, connecting to host PostgreSQL and Redis
#
# Usage:
# docker compose -f docker-compose.local.yml up --build
#
# Prerequisites:
# 1. PostgreSQL running on localhost:5432 with netskrafl_test database
# 2. Redis running on localhost:6379
# 3. GCP credentials at ./credentials/explo-dev/service-account.json
services:
app:
build:
context: .
dockerfile: Dockerfile
# Use host networking so the container can reach PostgreSQL and Redis
# on localhost. This means PORT binds directly on the host (no port mapping).
network_mode: host
environment:
PROJECT_ID: explo-dev
# PostgreSQL backend
DATABASE_BACKEND: postgresql
DATABASE_URL: postgresql://test:test@localhost:5432/netskrafl_test
# Redis on host
REDISHOST: "127.0.0.1"
REDISPORT: "6379"
# Not "local" in the dev-server sense; gunicorn handles port binding.
# Setting false avoids the check_port_available() conflict and uses
# the Docker/container logging path in main.py.
RUNNING_LOCAL: "false"
# Version tag
APP_VERSION: docker-local
# Credentials (mounted below)
GOOGLE_APPLICATION_CREDENTIALS: /app/credentials/service-account.json
# Listen port (use 3001 to avoid conflicts with other local services)
PORT: "3001"
volumes:
- ./credentials/explo-dev/service-account.json:/app/credentials/service-account.json:ro
restart: "no"