mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Huge role refactoring/cleanup. Other commits will propably follow. Because some bugs will exist. Still important for longrun and also for auto docs/help/slideshow generation
This commit is contained in:
14
roles/web-app-openproject/templates/Dockerfile.j2
Normal file
14
roles/web-app-openproject/templates/Dockerfile.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM openproject/community:{{applications.openproject.version}}
|
||||
|
||||
# If installing a local plugin (using `path:` in the `Gemfile.plugins` above),
|
||||
# you will have to copy the plugin code into the container here and use the
|
||||
# path inside of the container. Say for `/app/vendor/plugins/openproject-slack`:
|
||||
# COPY /path/to/my/local/openproject-slack /app/vendor/plugins/openproject-slack
|
||||
|
||||
COPY volumes/plugins/Gemfile.plugins /app/
|
||||
|
||||
# If the plugin uses any external NPM dependencies you have to install them here.
|
||||
# RUN npm add npm <package-name>*
|
||||
|
||||
RUN bundle config unset deployment && bundle install && bundle config set deployment 'true'
|
||||
RUN ./docker/prod/setup/postinstall.sh
|
98
roles/web-app-openproject/templates/docker-compose.yml.j2
Normal file
98
roles/web-app-openproject/templates/docker-compose.yml.j2
Normal file
@@ -0,0 +1,98 @@
|
||||
# @todo Test which containers can be removed crom cental_database networks
|
||||
x-op-app: &app
|
||||
logging:
|
||||
driver: journald
|
||||
image: {{custom_openproject_image}}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
|
||||
{% include 'roles/docker-compose/templates/base.yml.j2' %}
|
||||
|
||||
cache:
|
||||
image: memcached
|
||||
container_name: openproject-memcached
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
|
||||
proxy:
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
image: {{custom_openproject_image}}
|
||||
container_name: openproject-proxy
|
||||
command: "./docker/prod/proxy"
|
||||
ports:
|
||||
- "127.0.0.1:{{ports.localhost.http[application_id]}}:80"
|
||||
environment:
|
||||
APP_HOST: web
|
||||
depends_on:
|
||||
- web
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
web:
|
||||
<<: *app
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
command: "./docker/prod/web"
|
||||
container_name: openproject-web
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
||||
cache:
|
||||
condition: service_started
|
||||
seeder:
|
||||
condition: service_started
|
||||
{% set container_port = 8080 %}
|
||||
{% set container_healthcheck = 'health_checks/default' %}
|
||||
{% include 'roles/docker-container/templates/healthcheck/curl.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
worker:
|
||||
<<: *app
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
command: "./docker/prod/worker"
|
||||
container_name: openproject-worker
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
||||
cache:
|
||||
condition: service_started
|
||||
seeder:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
|
||||
cron:
|
||||
<<: *app
|
||||
{% include 'roles/docker-container/templates/base.yml.j2' %}
|
||||
command: "./docker/prod/cron"
|
||||
container_name: openproject-cron
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
{% include 'roles/docker-container/templates/depends_on/dmbs_incl.yml.j2' %}
|
||||
cache:
|
||||
condition: service_started
|
||||
seeder:
|
||||
condition: service_started
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
seeder:
|
||||
<<: *app
|
||||
command: "./docker/prod/seeder"
|
||||
container_name: openproject-seeder
|
||||
env_file:
|
||||
- "{{docker_compose.files.env}}"
|
||||
logging:
|
||||
driver: journald
|
||||
restart: on-failure
|
||||
{% include 'roles/docker-container/templates/networks.yml.j2' %}
|
||||
volumes:
|
||||
- "data:/var/openproject/assets"
|
||||
- "{{dummy_volume}}:/var/openproject/pgdata" # This mount is unnecessary and just done to prevent anonymous volumes
|
||||
|
||||
{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
|
||||
data:
|
||||
|
||||
{% include 'roles/docker-compose/templates/networks.yml.j2' %}
|
20
roles/web-app-openproject/templates/env.j2
Normal file
20
roles/web-app-openproject/templates/env.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
##
|
||||
# All environment variables defined here will only apply if you pass them
|
||||
# to the OpenProject container in docker-compose.yml under x-op-app -> environment.
|
||||
# For the examples here this is already the case.
|
||||
#
|
||||
# Please refer to our documentation to see all possible variables:
|
||||
# https://www.openproject.org/docs/installation-and-operations/configuration/environment/
|
||||
#
|
||||
OPENPROJECT_HTTPS=true
|
||||
OPENPROJECT_HOST__NAME={{domains | get_domain(application_id)}}
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT=
|
||||
IMAP_ENABLED=false
|
||||
POSTGRES_PASSWORD="{{ database_password }}"
|
||||
DATABASE_URL="{{ database_url_full }}?pool=20&encoding=unicode&reconnect=true"
|
||||
RAILS_MIN_THREADS=4
|
||||
RAILS_MAX_THREADS=16
|
||||
OPENPROJECT_HSTS=true
|
||||
RAILS_CACHE_STORE: "memcache"
|
||||
OPENPROJECT_CACHE__MEMCACHE__SERVER: "cache:11211"
|
||||
OPENPROJECT_RAILS__RELATIVE__URL__ROOT: ""
|
Reference in New Issue
Block a user