48 lines
1.4 KiB
Plaintext
48 lines
1.4 KiB
Plaintext
services:
|
|
nginx:
|
|
container_name: nginx
|
|
image: nginx:alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ${DOCKERDIR}/nginx/configs/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ${DOCKERDIR}/nginx/configs/sites:/etc/nginx/conf.d/
|
|
- ${DOCKERDIR}/nginx/certs/:/certs/
|
|
- ${DOCKERDIR}/nginx/webdir/:/var/www/
|
|
- ${DOCKERDIR}/nginx/logs:/var/log/nginx/
|
|
# - "external:internal", change external to desired port
|
|
ports:
|
|
- "443:443"
|
|
|
|
nginx-valkey:
|
|
image: valkey/valkey:latest
|
|
restart: unless-stopped
|
|
container_name: nginx-valkey
|
|
environment:
|
|
- ALLOW_EMPTY_PASSWORD=yes
|
|
|
|
db:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_PASSWORD: ${KEYWARDEN_POSTGRES_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${KEYWARDEN_POSTGRES_DB:-keywarden}
|
|
POSTGRES_USER: ${KEYWARDEN_POSTGRES_USER:-keywarden}
|
|
POSTGRES_PORT: ${KEYWARDEN_POSTGRES_PORT:-5432}
|
|
# Do not enable unless debugging, not needed to be exposed outside of docker network
|
|
# ports:
|
|
# - "5432:5432"
|
|
volumes:
|
|
- "pgdata:/var/lib/postgresql/data"
|
|
|
|
api:
|
|
build: .
|
|
depends_on:
|
|
- db
|
|
env_file:
|
|
- .env
|
|
# API runs on port 8000, but is unneeded to be external unless using a custom reverse proxy on another machine
|
|
# ports:
|
|
# - "8000:8000"
|
|
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
|
|
|
|
volumes:
|
|
pgdata: |