Skip to content

Commit

Permalink
tweak(scripts/dockercompose): make db service optional
Browse files Browse the repository at this point in the history
  • Loading branch information
pschuele committed Jul 18, 2024
1 parent 06f7449 commit 8717b24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions scripts/ansible/roles/tinedockercompose/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ tinedockercompose_ports: "80:80"
tinedockercompose_auto_installupdate: false
tinedockercompose_addtineuser: true

tinedockercompose_db_service: true
tinedockercompose_db_host: "db"
tinedockercompose_db_image: "mariadb:10.6"
tinedockercompose_db_command: "--max-allowed-packet=209715210"
tinedockercompose_db_path: "/srv/tine/db"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
version: '2'
services:
{% if tinedockercompose_db_service is defined and tinedockercompose_db_service|bool %}
db:
image: {{ tinedockercompose_db_image }}
command: {{ tinedockercompose_db_command }}
Expand All @@ -16,14 +17,15 @@ services:
networks:
- internal_network

{% endif %}
web:
image: {{ tinedockercompose_tine_image }}
restart: always
depends_on:
- db
- cache
environment:
TINE20_DATABASE_HOST: db
TINE20_DATABASE_HOST: {{ tinedockercompose_db_host }}
TINE20_DATABASE_DBNAME: *MYSQL_DATABASE
TINE20_DATABASE_USERNAME: *MYSQL_USER
TINE20_DATABASE_PASSWORD: *MYSQL_PASSWORD
Expand Down

0 comments on commit 8717b24

Please sign in to comment.