Add database migrations for WebGIS modules
This commit is contained in:
@@ -33,6 +33,23 @@ services:
|
||||
DB_USER: webgis
|
||||
DB_PASSWORD: webgis_password
|
||||
DB_NAME: webgis_project
|
||||
depends_on:
|
||||
migrate:
|
||||
condition: service_completed_successfully
|
||||
|
||||
migrate:
|
||||
build:
|
||||
context: .
|
||||
dockerfile_inline: |
|
||||
FROM mariadb:10.11
|
||||
COPY db/schema.sql /schema.sql
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_USER: webgis
|
||||
DB_PASSWORD: webgis_password
|
||||
DB_NAME: webgis_project
|
||||
command: >
|
||||
sh -c "mariadb --host=db --user=webgis --password=webgis_password webgis_project < /schema.sql"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
Reference in New Issue
Block a user