From 0ad909cb2efca5066bf33afd6ba9c63dbfb97e50 Mon Sep 17 00:00:00 2001 From: HusnaHariz Date: Mon, 6 May 2019 10:51:21 +0300 Subject: [PATCH] add db image --- reporting/docker-compose.yml | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/reporting/docker-compose.yml b/reporting/docker-compose.yml index c6057b5d..7fe56470 100644 --- a/reporting/docker-compose.yml +++ b/reporting/docker-compose.yml @@ -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: @@ -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: @@ -110,8 +123,6 @@ services: superset: build: context: ./superset - ports: - - "8088:8088" env_file: - ./.env environment: @@ -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'