Skip to content

Commit

Permalink
add db image
Browse files Browse the repository at this point in the history
  • Loading branch information
HusnaHariz committed May 20, 2019
1 parent a669a6c commit 0ad909c
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions reporting/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ services:
&& openssl passwd -apr1 $NGINX_BASIC_AUTH_PW >> /etc/nginx/.htpasswd
&& sleep 120
&& /home/run.sh"
logging:
driver: syslog
options:
syslog-address: "udp://127.0.0.1:${SYSLOG_UDP_PORT}"
# logging:
# driver: syslog
# options:
# syslog-address: "udp://127.0.0.1:${SYSLOG_UDP_PORT}"
depends_on: [consul, log, config-container]

nifi:
Expand All @@ -71,12 +71,25 @@ services:
bash -c "/config/nifi/scripts/start.sh ${OL_NIFI_VERSION} ${BASE_URL} ${USERNAME} ${PASSWORD} ${CLIENT_ID} ${CLIENT_SECRET} ${DB_PASSWORD} ${FHIR_ID} ${FHIR_PASSWORD}"
environment:
- NIFI_JVM_HEAP_MAX=${NIFI_JVM_HEAP_MAX}
logging:
driver: syslog
options:
syslog-address: "udp://127.0.0.1:${SYSLOG_UDP_PORT}"
# logging:
# driver: syslog
# options:
# syslog-address: "udp://127.0.0.1:${SYSLOG_UDP_PORT}"
depends_on: [log, config-container, nginx]


db:
image: openlmis/postgres:${OL_POSTGRES_VERSION}
command:
"psql 'postgresql://${DATABASE_USERNAME}:${DATABASE_PASSWORD}@${DATABASE_HOST}/${DATABASE_NAME}' -f /var/lib/postgresql/data/OlmisCreateTableStatements.sql"
volumes:
- ./db/docker-entrypoint-initdb.d/templates:/var/lib/postgresql/data
# logging:
# driver: syslog
# options:
# syslog-address: "udp://127.0.0.1:${SYSLOG_UDP_PORT}"
depends_on: [log, consul]

zookeeper:
image: confluentinc/cp-zookeeper:${OL_ZOOKEEPER_VERSION}
environment:
Expand Down Expand Up @@ -110,8 +123,6 @@ services:
superset:
build:
context: ./superset
ports:
- "8088:8088"
env_file:
- ./.env
environment:
Expand All @@ -127,7 +138,6 @@ services:
bash -c "cp -r /config/superset /etc/
&& apt-get update
&& apt-get install -y postgresql-client
&& psql -v ON_ERROR_STOP=1 --username "$DATABASE_USERNAME" --dbname "${DATABASE_NAME}" < /etc/superset/db/OlmisCreateTableStatements.sql
&& sleep 30 && fabmanager create-admin --app superset --username ${SUPERSET_ADMIN_USERNAME} --firstname Admin --lastname Admin --email noreply --password ${SUPERSET_ADMIN_PASSWORD}
&& superset db upgrade
&& python3 /etc/superset/substitute_variables.py '/etc/superset/datasources/database.yaml' '/etc/superset/dashboards/openlmis_uat_dashboards.json'
Expand Down

0 comments on commit 0ad909c

Please sign in to comment.