Initialize database from app service
This commit is contained in:
+2
-5
@@ -4,10 +4,11 @@ services:
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
command: sh -c "sleep 25 && apache2-foreground"
|
||||
command: sh -c "php /var/www/html/docker/initdb.php && apache2-foreground"
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_PORT: "3306"
|
||||
DB_ROOT_PASSWORD: rootwebgis
|
||||
DB_USER: webgis
|
||||
DB_PASSWORD: webgis
|
||||
DB_NAME_01: spbu_db
|
||||
@@ -24,10 +25,6 @@ services:
|
||||
MARIADB_ROOT_PASSWORD: rootwebgis
|
||||
volumes:
|
||||
- webgis_db_data:/var/lib/mysql
|
||||
- ./docker/initdb/00-user.sql:/docker-entrypoint-initdb.d/00-user.sql:ro
|
||||
- ./01/spbu_db.sql:/docker-entrypoint-initdb.d/01-spbu_db.sql:ro
|
||||
- ./02/webgis2.sql:/docker-entrypoint-initdb.d/02-webgis2.sql:ro
|
||||
- ./05/webgis_uas.sql:/docker-entrypoint-initdb.d/05-webgis_uas.sql:ro
|
||||
|
||||
volumes:
|
||||
webgis_db_data:
|
||||
|
||||
Reference in New Issue
Block a user