mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Finished final raw draft of central database implementation. UNTESTED.
This commit is contained in:
@@ -1,18 +1,8 @@
|
||||
version: "3.7"
|
||||
|
||||
networks:
|
||||
frontend:
|
||||
backend:
|
||||
|
||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
||||
data:
|
||||
|
||||
x-op-restart-policy: &restart_policy
|
||||
restart: unless-stopped
|
||||
x-op-image: &image
|
||||
image: openproject/community:${TAG:-13}
|
||||
|
||||
x-op-app: &app
|
||||
<<: [*image, *restart_policy]
|
||||
restart: unless-stopped
|
||||
image: openproject/community:${TAG:-13}
|
||||
environment:
|
||||
OPENPROJECT_HTTPS: "${OPENPROJECT_HTTPS}"
|
||||
OPENPROJECT_HOST__NAME: "${OPENPROJECT_HOST__NAME}"
|
||||
@@ -27,24 +17,20 @@ x-op-app: &app
|
||||
IMAP_ENABLED: "${IMAP_ENABLED:-false}"
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
{% if not enable_central_database %}
|
||||
- "database:/var/openproject/pgdata"
|
||||
{% endif %}
|
||||
# - "database:/var/openproject/pgdata"
|
||||
|
||||
services:
|
||||
|
||||
{% include 'templates/docker-service-{{ database_type }}.yml.j2' %}
|
||||
networks:
|
||||
- backend
|
||||
|
||||
cache:
|
||||
image: memcached
|
||||
<<: *restart_policy
|
||||
networks:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||
|
||||
proxy:
|
||||
<<: [*image, *restart_policy]
|
||||
restart: unless-stopped
|
||||
image: openproject/community:${TAG:-13}
|
||||
command: "./docker/prod/proxy"
|
||||
ports:
|
||||
- "${PORT}:80"
|
||||
@@ -53,21 +39,16 @@ services:
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: "${OPENPROJECT_RAILS__RELATIVE__URL__ROOT:-}"
|
||||
depends_on:
|
||||
- web
|
||||
networks:
|
||||
- frontend
|
||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
{% if not enable_central_database %}
|
||||
- "database:/var/openproject/pgdata"
|
||||
{% endif %}
|
||||
# - "database:/var/openproject/pgdata" Should definetly not be necessary here
|
||||
|
||||
web:
|
||||
<<: *app
|
||||
command: "./docker/prod/web"
|
||||
networks:
|
||||
- frontend
|
||||
- backend
|
||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
|
||||
cache:
|
||||
seeder:
|
||||
labels:
|
||||
@@ -91,18 +72,16 @@ services:
|
||||
worker:
|
||||
<<: *app
|
||||
command: "./docker/prod/worker"
|
||||
networks:
|
||||
- backend
|
||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
|
||||
cache:
|
||||
seeder:
|
||||
|
||||
cron:
|
||||
<<: *app
|
||||
command: "./docker/prod/cron"
|
||||
networks:
|
||||
- backend
|
||||
{% include 'templates/docker-container-depends-on.yml.j2' %}
|
||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||
{% include 'templates/docker-container-depends-on-also-database.yml.j2' %}
|
||||
cache:
|
||||
seeder:
|
||||
|
||||
@@ -110,5 +89,9 @@ services:
|
||||
<<: *app
|
||||
command: "./docker/prod/seeder"
|
||||
restart: on-failure
|
||||
networks:
|
||||
- backend
|
||||
{% include 'templates/docker-container-networks.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker-compose-networks.yml.j2' %}
|
||||
|
||||
{% include 'templates/docker-compose-volumes.yml.j2' %}
|
||||
data:
|
Reference in New Issue
Block a user