Update stack.production.yml

This commit is contained in:
colin 2025-02-02 22:57:16 -05:00
parent 1241b214fa
commit 7f891e4ce3
1 changed files with 46 additions and 77 deletions

View File

@ -1,91 +1,60 @@
version: '3'
version: '3.8'
services:
database:
image: git.nixc.us/colin/hedgedoc:production-database
db:
image: postgres:15
environment:
- POSTGRES_USER=hedgedoc
- POSTGRES_PASSWORD=password
- POSTGRES_DB=hedgedoc
POSTGRES_USER: odoo
POSTGRES_PASSWORD: password # Replace with a strong password
POSTGRES_DB: odoo
volumes:
- /mnt/tank/persist/nixc.us/hedgedoc/production/db:/var/lib/postgresql/data
deploy:
replicas: 1
placement:
constraints:
## - node.labels.role == db
- node.hostname == macmini2
# - node.labels.mac-rack == true
labels:
- "us.nixc.autodeploy=true"
- "traefik.enable=false"
- /mnt/tank/persist/nixc.us/odoo/production/db:/var/lib/postgresql/data
networks:
- default
# logging:
# driver: "gelf"
# options:
# gelf-address: "udp://log.nixc.us:15124"
# tag: "hedgedoc_database"
hedgedoc:
# Make sure to use the latest release from https://hedgedoc.org/latest-release
image: git.nixc.us/colin/hedgedoc:production-hedgedoc
environment:
# CMD_ALLOW_ANONYMOUS: "true"
CMD_ALLOW_ANONYMOUS_EDITS: "true"
CMD_ALLOW_FREEURL: "true"
CMD_DB_URL: "postgres://hedgedoc:password@hedgedoc_database:5432/hedgedoc"
CMD_DOMAIN: "hedgedoc.nixc.us"
# CMD_URL_ADDPORT: "true"
CMD_PROTOCOL_USESSL: "true"
CMD_SESSION_SECRET: "kcxFbvEv4gQeeDuXTJJDQ4Vj878C4p2AQFe9Ur33tLeUdQNzGGiQz6NAmEoxjZXH"
CMD_DB_USERNAME: "hedgedoc"
CMD_DB_PASSWORD: "password"
CMD_DB_HOST: "database"
CMD_DB_PORT: "5432"
# CMD_LDAP_URL: ldap://lldap_lldap:3890
# CMD_LDAP_BINDDN: uid=admin,ou=people,dc=nixc,dc=us
# CMD_LDAP_BINDCREDENTIALS: ehgJHdnbMvz8vEGVSYqRAC2r3WUisLxTRLnuXuXb72DEvhi8Ayzu4CQj9h2sexpX
# CMD_LDAP_SEARCHBASE: ou=people,dc=nixc,dc=us
# CMD_LDAP_SEARCHFILTER: '(&(memberOf=cn=hedgedocUsers,ou=groups,dc=nixc,dc=us)(uid={{username}}))'
# CMD_LDAP_USERIDFIELD: uid
volumes:
- /mnt/tank/persist/nixc.us/hedgedoc/production/uploads:/hedgedoc/public/uploads
# ports:
# - "3000:3000"
depends_on:
- database
- odoo-net
deploy:
replicas: 1
placement:
constraints:
## - node.labels.role == db
- node.hostname == macmini2
# - node.labels.mac-rack == true
labels:
homepage.group: apps
homepage.name: hedgedoc
homepage.href: https://hedgedoc.nixc.us/
homepage.description: hedgedoc
us.nixc.autodeploy: "true"
traefik.enable: "true"
traefik.http.routers.production_hedgedoc.tls: "true"
traefik.http.services.production_hedgedoc.loadbalancer.server.port: 3000
traefik.http.routers.production_hedgedoc.rule: Host(`hedgedoc.nixc.us`)
traefik.http.routers.production_hedgedoc.entrypoints: websecure
traefik.http.routers.production_hedgedoc.tls.certresolver: letsencryptresolver
traefik.http.routers.production_hedgedoc.service: production_hedgedoc
traefik.docker.network: traefik
# - 'traefik.http.routers.production_hedgedoc.middlewares=authelia@docker'
traefik.enable: "false"
odoo:
image: odoo:16 # Specify the desired Odoo version
depends_on:
- db
environment:
HOST: db
USER: odoo
PASSWORD: password # Same as POSTGRES_PASSWORD
volumes:
- /mnt/tank/persist/nixc.us/odoo/production/odoo-data:/var/lib/odoo
- /mnt/tank/persist/nixc.us/odoo/production/addons:/mnt/extra-addons # For custom addons
- /mnt/tank/persist/nixc.us/odoo/production/config:/etc/odoo # For custom configurations
networks:
- default
- traefik
# logging:
# driver: "gelf"
# options:
# gelf-address: "udp://log.nixc.us:15124"
# tag: "hedgedoc_app"
- odoo-net
- traefik-public
deploy:
replicas: 1
placement:
constraints:
- node.hostname == macmini2
labels:
traefik.enable: "true"
traefik.docker.network: traefik-public
traefik.http.routers.odoo.rule: Host(`odoo.nixc.us`)
traefik.http.routers.odoo.entrypoints: websecure
traefik.http.routers.odoo.tls.certresolver: letsencryptresolver
traefik.http.services.odoo.loadbalancer.server.port: 8069
homepage.group: apps
homepage.name: odoo
homepage.href: https://odoo.nixc.us/
homepage.description: Odoo ERP
us.nixc.autodeploy: "true"
networks:
traefik:
odoo-net:
driver: overlay
traefik-public:
external: true
default:
external: false