initial production version
This commit is contained in:
41
docker-compose.yml
Normal file
41
docker-compose.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: wishlist-db
|
||||
environment:
|
||||
POSTGRES_USER: wishlistuser
|
||||
POSTGRES_PASSWORD: wishlistpassword
|
||||
POSTGRES_DB: wishlist
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U wishlistuser -d wishlist"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: wishlist-app
|
||||
environment:
|
||||
DATABASE_URL: postgresql://wishlistuser:wishlistpassword@db:5432/wishlist
|
||||
NODE_ENV: production
|
||||
PORT: 3000
|
||||
AUTH_SECRET: ${AUTH_SECRET:-change-me-in-production}
|
||||
AUTH_URL: ${AUTH_URL:-http://localhost:3000}
|
||||
AUTH_TRUST_HOST: true
|
||||
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
|
||||
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user