mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-20 11:42:54 +02:00
build: Include Mongo dump with init in local deployment (#448)
Added the latest data from the internet-facing staging DB as json files to the repo (Git LFS) and added another container to the local deployment that ingests the files upon creation. --------- Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de>
This commit is contained in:
parent
043501a784
commit
c917cac58a
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
assets/*.json filter=lfs diff=lfs merge=lfs -text
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,6 +2,9 @@
|
||||
**/*.xml
|
||||
**/*.json
|
||||
|
||||
# Keep assets
|
||||
!assets/**/*
|
||||
|
||||
# LaTeX temp files
|
||||
**/*.aux
|
||||
**/*-blx.bib
|
||||
|
3
assets/mongo_import.sh
Normal file
3
assets/mongo_import.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
mongoimport --host ${MONGO_HOST}:${MONGO_PORT} -u ${MONGO_USERNAME} -p ${MONGO_PASSWORD} --authenticationDatabase admin --db ${MONGO_DATABASE} --collection companies --file /tmp/transparenzregister.companies.json --jsonArray
|
||||
mongoimport --host ${MONGO_HOST}:${MONGO_PORT} -u ${MONGO_USERNAME} -p ${MONGO_PASSWORD} --authenticationDatabase admin --db ${MONGO_DATABASE} --collection news --file /tmp/transparenzregister.news.json --jsonArray
|
BIN
assets/transparenzregister.companies.json
(Stored with Git LFS)
Normal file
BIN
assets/transparenzregister.companies.json
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/transparenzregister.news.json
(Stored with Git LFS)
Normal file
BIN
assets/transparenzregister.news.json
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -35,6 +35,21 @@ services:
|
||||
deploy:
|
||||
replicas: 1 # set to one to activate
|
||||
|
||||
mongodb-init:
|
||||
image: mongo:4.4.6
|
||||
depends_on:
|
||||
- mongodb
|
||||
restart: no
|
||||
volumes:
|
||||
- ./assets:/tmp
|
||||
environment:
|
||||
MONGO_PASSWORD: ${PYTHON_MONGO_PASSWORD:?error}
|
||||
MONGO_USERNAME: ${PYTHON_MONGO_USERNAME:-root}
|
||||
MONGO_HOST: ${PYTHON_MONGO_HOST:-mongodb}
|
||||
MONGO_PORT: ${PYTHON_MONGO_PORT:-27017}
|
||||
MONGO_DATABASE: ${PYTHON_MONGO_DATABASE:-transparenzregister}
|
||||
entrypoint: [/tmp/mongo_import.sh]
|
||||
|
||||
postgres:
|
||||
image: postgres:15.4
|
||||
restart: always
|
||||
@ -95,12 +110,3 @@ volumes:
|
||||
postgres_data:
|
||||
mongo_data:
|
||||
ingest_data:
|
||||
|
||||
networks:
|
||||
default:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 192.168.7.0/24
|
||||
gateway: 192.168.7.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user