Skip to content

Commit

Permalink
Merge pull request #24 from VSLCatena/development
Browse files Browse the repository at this point in the history
Move x-variables to env variables with default value
  • Loading branch information
Kipjr authored Aug 13, 2023
2 parents 574cda4 + 1255936 commit d74b2d6
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
x-variables:
- &DB_HOST "db"
- &DB_ROOT_PASSWORD "db"
- &DB_DATABASE "marktwerking"
- &DB_USERNAME "dbuser"
- &DB_PASSWORD "dbpass"
- &MW_ADMIN_PASSWORD "MW23"
- &MW_DEBUG "True"
- &MW_IP_WHITELIST "192.168.4.0/24,192.168.40.0/24"

services:

#phpmyadmin
Expand All @@ -18,9 +8,9 @@ services:
profiles:
- debug
environment:
PMA_HOST: *DB_HOST
PMA_HOST: ${DB_HOST:-db}
PMA_USER: root
PMA_PASSWORD: *DB_ROOT_PASSWORD
PMA_PASSWORD: ${DB_ROOT_PASSWORD:-db}
TZ: Europe/Amsterdam
ports:
- 4081:80
Expand All @@ -34,10 +24,10 @@ services:
container_name: marktwerking.db
image: 'yobasystems/alpine-mariadb:latest'
environment:
MYSQL_ROOT_PASSWORD: *DB_ROOT_PASSWORD
MYSQL_DATABASE: *DB_DATABASE
MYSQL_USER: *DB_USERNAME
MYSQL_PASSWORD: *DB_PASSWORD
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-db}
MYSQL_DATABASE: ${DB_DATABASE:-marktwerking}
MYSQL_USER: ${DB_USERNAME:-dbuser}
MYSQL_PASSWORD: ${DB_PASSWORD:-dbpass}
volumes:
- dbdata:/var/lib/mysql/ # allows you to stop and restart the db service without losing data
volumes_from:
Expand All @@ -58,13 +48,13 @@ services:
- DEPLOY_ENV="production" #development
container_name: marktwerking.php
environment:
MW_DB_HOST: *DB_HOST
MW_DB_USERNAME: *DB_USERNAME
MW_DB_PASSWORD: *DB_PASSWORD
MW_DB_DATABASE: *DB_DATABASE
MW_BAR_PASSWORD: *MW_ADMIN_PASSWORD
MW_IP_WHITELIST: *MW_IP_WHITELIST
MW_DEBUG: *MW_DEBUG
MW_DB_HOST: ${DB_HOST:-db}
MW_DB_USERNAME: ${DB_USERNAME:-dbuser}
MW_DB_PASSWORD: ${DB_PASSWORD:-dbpass}
MW_DB_DATABASE: ${DB_DATABASE:-marktwerking}
MW_BAR_PASSWORD: ${MW_ADMIN_PASSWORD:-MW23}
MW_IP_WHITELIST: ${MW_IP_WHITELIST:-"192.168.4.0/24,192.168.40.0/24"}
MW_DEBUG: ${MW_DEBUG:-False}
TITLE: Marktwerking 2023
tty: true
# volumes:
Expand Down

0 comments on commit d74b2d6

Please sign in to comment.