Initial commit: Homelab API
This commit is contained in:
47
docker-compose.yml
Normal file
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
name: services_proxy
|
||||
internal:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
api:
|
||||
build: .
|
||||
container_name: homelab-api
|
||||
restart: always
|
||||
environment:
|
||||
- DATABASE_URL=postgres://homelab:${DB_PASSWORD}@db:5432/homelab?sslmode=disable
|
||||
- JWT_SECRET=${JWT_SECRET}
|
||||
- PORT=8080
|
||||
- RESEND_API_KEY=${RESEND_API_KEY}
|
||||
- FROM_EMAIL=${FROM_EMAIL:-noreply@digital-home.site}
|
||||
- FROM_NAME=${FROM_NAME:-Homelab}
|
||||
- APP_URL=${APP_URL:-https://api.digital-home.site}
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- proxy
|
||||
- internal
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
container_name: homelab-db
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER=homelab
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
- POSTGRES_DB=homelab
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U homelab"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- internal
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
Reference in New Issue
Block a user