Improve self host support (#28)
* Add docker setup for self hosting * Add ses settings tables
This commit is contained in:
56
docker-compose.yml
Normal file
56
docker-compose.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
name: unsend-prod
|
||||
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
container_name: postgres
|
||||
restart: always
|
||||
environment:
|
||||
- POSTGRES_USER=${POSTGRES_USER:?err}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?err}
|
||||
- POSTGRES_DB=${POSTGRES_DB:?err}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
volumes:
|
||||
- database:/var/lib/postgresql/data
|
||||
|
||||
# You don't need to expose this port to the host since, docker compose creates an internal network
|
||||
# through which both of these containers could talk to each other using their container_name as hostname
|
||||
# But if you want to connect this to a querying tool to debug you can definitely uncomment this
|
||||
# ports:
|
||||
# - "5432:5432"
|
||||
|
||||
unsend:
|
||||
build:
|
||||
dockerfile: Dockerfile
|
||||
image: unsend
|
||||
container_name: unsend
|
||||
restart: always
|
||||
ports:
|
||||
- ${PORT:-3000}:${PORT:-3000}
|
||||
environment:
|
||||
- PORT=${PORT:-3000}
|
||||
- DATABASE_URL=${DATABASE_URL:?err}
|
||||
- NEXTAUTH_URL=${NEXTAUTH_URL:?err}
|
||||
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET:?err}
|
||||
- AWS_ACCESS_KEY=${AWS_ACCESS_KEY:?err}
|
||||
- AWS_SECRET_KEY=${AWS_SECRET_KEY:?err}
|
||||
- AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION:?err}
|
||||
- GITHUB_ID=${GITHUB_ID:?err}
|
||||
- GITHUB_SECRET=${GITHUB_SECRET:?err}
|
||||
- APP_URL=${APP_URL:-${NEXTAUTH_URL}}
|
||||
- SNS_TOPIC=${SNS_TOPIC:?err}
|
||||
- NEXT_PUBLIC_IS_CLOUD=${NEXT_PUBLIC_IS_CLOUD:-false}
|
||||
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
|
||||
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
|
||||
- SES_QUEUE_LIMIT=${SES_QUEUE_LIMIT:-1}
|
||||
- API_RATE_LIMIT=${API_RATE_LIMIT:-1}
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
database:
|
Reference in New Issue
Block a user