Files
komodo/compose/postgres.compose.yaml
Maxwell Becker 12abd5a5bd 1.14.2 (#70)
* docker builders / buildx prune backend

* seems to work with ferret

* improve UI error messages

* compose files

* update compose variables comment

* update compose files

* update sqlite compose

* env vars and others support end of line comment starting with " #"

* aws and hetzner default user data for hands free setup

* move configs

* new core config

* smth

* implement disable user registration

* clean up compose files

* add DISABLE_USER_REGISTRATION

* 1.14.2

* final
2024-09-11 10:50:59 -07:00

113 lines
3.7 KiB
YAML

#############################
# KOMODO COMPOSE - POSTGRES #
#############################
## This compose file will deploy:
## 1. Postgres + FerretDB Mongo adapter
## 2. Komodo Core
## 3. Komodo Periphery
services:
postgres:
image: postgres
restart: unless-stopped
logging:
driver: local
networks:
- database
ports:
- 5432:5432
volumes:
- pg-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=${DB_USERNAME}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=komodo
ferretdb:
image: ghcr.io/ferretdb/ferretdb
restart: unless-stopped
depends_on:
- postgres
logging:
driver: local
networks:
- default
- database
ports:
- 27017:27017
environment:
- FERRETDB_POSTGRESQL_URL=postgres://postgres:5432/komodo
core:
image: ghcr.io/mbecker20/komodo:latest
# image: ghcr.io/mbecker20/komodo:latest-aarch64 ## Use for arm support
restart: unless-stopped
depends_on:
- ferretdb
logging:
driver: local
networks:
- default
ports:
- 9120:9120
# volumes: # Optionally mount a custom core.config.toml
# - /path/to/core.config.toml:/config/config.toml
# extra_hosts: # allows for systemd Periphery connection at "http://host.docker.internal:8120"
# - host.docker.internal:host-gateway
environment: # https://github.com/mbecker20/komodo/blob/main/config/core.config.toml
KOMODO_HOST: ${KOMODO_HOST}
KOMODO_TITLE: ${KOMODO_TITLE}
KOMODO_ENSURE_SERVER: http://periphery:8120
## Mongo
KOMODO_MONGO_URI: mongodb://${DB_USERNAME}:${DB_PASSWORD}@ferretdb:27017/komodo?authMechanism=PLAIN
## Secrets
KOMODO_PASSKEY: ${KOMODO_PASSKEY}
KOMODO_WEBHOOK_SECRET: ${KOMODO_WEBHOOK_SECRET}
KOMODO_JWT_SECRET: ${KOMODO_JWT_SECRET}
## Auth
KOMODO_LOCAL_AUTH: ${KOMODO_LOCAL_AUTH}
KOMODO_DISABLE_USER_REGISTRATION: ${KOMODO_DISABLE_USER_REGISTRATION}
## Github Oauth
# KOMODO_GITHUB_OAUTH_ENABLED: ${KOMODO_GITHUB_OAUTH_ENABLED}
# KOMODO_GITHUB_OAUTH_ID: ${KOMODO_GITHUB_OAUTH_ID}
# KOMODO_GITHUB_OAUTH_SECRET: ${KOMODO_GITHUB_OAUTH_SECRET}
## Google Oauth
# KOMODO_GOOGLE_OAUTH_ENABLED: ${KOMODO_GOOGLE_OAUTH_ENABLED}
# KOMODO_GOOGLE_OAUTH_ID: ${KOMODO_GOOGLE_OAUTH_ID}
# KOMODO_GOOGLE_OAUTH_SECRET: ${KOMODO_GOOGLE_OAUTH_SECRET}
## Aws
# KOMODO_AWS_ACCESS_KEY_ID: ${KOMODO_AWS_ACCESS_KEY_ID}
# KOMODO_AWS_SECRET_ACCESS_KEY: ${KOMODO_AWS_SECRET_ACCESS_KEY}
## Hetzner
# KOMODO_HETZNER_TOKEN: ${KOMODO_HETZNER_TOKEN}
## Deploy Periphery container using this block,
## or deploy the Periphery binary with systemd using https://github.com/mbecker20/komodo/tree/main/scripts
periphery:
image: ghcr.io/mbecker20/periphery:latest
# image: ghcr.io/mbecker20/periphery:latest-aarch64 # Use for arm support
logging:
driver: local
networks:
- default
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- repos:/etc/komodo/repos # manage repos in a docker volume, or change it to an accessible host directory.
- stacks:/etc/komodo/stacks # manage stack files in a docker volume, or change it to an accessible host directory.
environment:
# If the disk size is overreporting, can use one of these to
# whitelist / blacklist the disks to filter them, whichever is easier.
# Accepts comma separated list of paths.
# Usually whitelisting just /etc/hostname gives correct size.
PERIPHERY_INCLUDE_DISK_MOUNTS: /etc/hostname
# PERIPHERY_EXCLUDE_DISK_MOUNTS: /snap,/etc/repos
volumes:
pg-data:
repos:
stacks:
networks:
default: {}
database: {}