2024-01-01 01:06:30 -08:00
|
|
|
# docker-compose.dev.yml
|
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
web:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./Dockerfile
|
|
|
|
volumes:
|
|
|
|
- .:/app/web
|
|
|
|
environment:
|
|
|
|
POSTGRES_ADDR: postgres
|
|
|
|
POSTGRES_DATABASE: savage_tracking
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/savage_tracking?schema=public
|
2024-08-14 02:59:05 -07:00
|
|
|
JWT_SECRET: "CHANGE_THIS"
|
2024-01-01 01:06:30 -08:00
|
|
|
TZ: Asia/Taipei
|
2024-08-14 02:59:05 -07:00
|
|
|
RFID_PKEY: "CHANGE_THIS"
|
2024-01-01 01:06:30 -08:00
|
|
|
depends_on:
|
|
|
|
postgres:
|
|
|
|
condition: service_healthy
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- 3000:3000
|
|
|
|
postgres:
|
|
|
|
image: postgres:16-alpine
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
POSTGRES_DB: savage_tracking
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
volumes:
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
healthcheck:
|
|
|
|
test:
|
|
|
|
["CMD", "pg_isready", "-U", "postgres", "-d", "savage_tracking"]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 5
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
pgdata: {}
|