initial commit
This commit is contained in:
commit
6ffc0d2c99
54 changed files with 11900 additions and 0 deletions
38
docker-compose.yml
Normal file
38
docker-compose.yml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
services:
|
||||
db:
|
||||
image: postgres:18-alpine
|
||||
environment:
|
||||
POSTGRES_DB: go_guess
|
||||
POSTGRES_USER: go_guess
|
||||
POSTGRES_PASSWORD: go_guess
|
||||
ports:
|
||||
- "${DB_PORT:-5432}:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U go_guess -d go_guess"]
|
||||
interval: 3s
|
||||
timeout: 3s
|
||||
retries: 20
|
||||
|
||||
api:
|
||||
build: ./backend
|
||||
environment:
|
||||
DATABASE_URL: postgres://go_guess:go_guess@db:5432/go_guess?sslmode=disable
|
||||
JWT_SECRET: local-development-secret-change-me-12345
|
||||
FRONTEND_URL: http://localhost:5173
|
||||
ports:
|
||||
- "${API_PORT:-8080}:8080"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
web:
|
||||
build: ./frontend
|
||||
ports:
|
||||
- "${WEB_PORT:-5173}:80"
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue