remove mounts from docker-compose, add checks for database creation
This commit is contained in:
parent
723f1783ff
commit
ef876204c4
|
@ -11,7 +11,7 @@ services:
|
||||||
- "rabbitmq"
|
- "rabbitmq"
|
||||||
volumes:
|
volumes:
|
||||||
- static_assets:/opt/postal/public
|
- static_assets:/opt/postal/public
|
||||||
- ./data/postal/assets:/opt/postal/public/assets
|
- postal_assets:/opt/postal/public/assets
|
||||||
- ./src/templates/:/templates
|
- ./src/templates/:/templates
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=changeme
|
- MYSQL_ROOT_PASSWORD=changeme
|
||||||
|
@ -23,7 +23,7 @@ services:
|
||||||
image: mariadb:10
|
image: mariadb:10
|
||||||
container_name: postal_mysql
|
container_name: postal_mysql
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mysql:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=changeme
|
- MYSQL_ROOT_PASSWORD=changeme
|
||||||
- MYSQL_DATABASE=postal
|
- MYSQL_DATABASE=postal
|
||||||
|
@ -46,7 +46,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./src/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./src/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
- static_assets:/opt/postal/public:ro
|
- static_assets:/opt/postal/public:ro
|
||||||
- ./data/postal/assets:/opt/postal/public/assets:ro
|
- postal_assets:/opt/postal/public/assets:ro
|
||||||
volumes:
|
volumes:
|
||||||
static_assets:
|
static_assets:
|
||||||
|
postal_assets:
|
||||||
|
mysql_data:
|
||||||
|
|
|
@ -11,7 +11,7 @@ services:
|
||||||
- "rabbitmq"
|
- "rabbitmq"
|
||||||
volumes:
|
volumes:
|
||||||
- static_assets:/opt/postal/public
|
- static_assets:/opt/postal/public
|
||||||
- ./data/postal/assets:/opt/postal/public/assets
|
- postal_assets:/opt/postal/public/assets
|
||||||
- ./src/templates/:/templates
|
- ./src/templates/:/templates
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=changeme
|
- MYSQL_ROOT_PASSWORD=changeme
|
||||||
|
@ -23,7 +23,7 @@ services:
|
||||||
image: mariadb:10
|
image: mariadb:10
|
||||||
container_name: postal_mysql
|
container_name: postal_mysql
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/mysql:/var/lib/mysql
|
- mysql_data:/var/lib/mysql
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=changeme
|
- MYSQL_ROOT_PASSWORD=changeme
|
||||||
- MYSQL_DATABASE=postal
|
- MYSQL_DATABASE=postal
|
||||||
|
@ -46,7 +46,8 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- ./src/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
- ./src/nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||||
- static_assets:/opt/postal/public:ro
|
- static_assets:/opt/postal/public:ro
|
||||||
- ./data/postal/assets:/opt/postal/public/assets:ro
|
- postal_assets:/opt/postal/public/assets:ro
|
||||||
volumes:
|
volumes:
|
||||||
static_assets:
|
static_assets:
|
||||||
|
postal_assets:
|
||||||
|
mysql_data:
|
||||||
|
|
|
@ -20,7 +20,7 @@ echo "== Waiting for MySQL to start up =="
|
||||||
while ! mysqladmin ping -h mysql --silent; do
|
while ! mysqladmin ping -h mysql --silent; do
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
while ! mysql -u root -p"$MYSQL_ROOT_PASSWORD" -e 'use postal' 2> /dev/null; do
|
while ! mysql -u root -p"$MYSQL_ROOT_PASSWORD" -e "$MYSQL_DATABASE" 2> /dev/null; do
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user