kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 1 | # docker-compose for ONAP portal containers: database, microservice, portal apps. |
| 2 | # Relies on .env file in current directory. |
| 3 | # Works in multiple environments; does not pull from a Nexus registry. |
| 4 | # Exposes the portal apps docker (but not DB nor WMS dockers) on the host network. |
| 5 | # Images must be pulled from ONAP Nexus registry after logging in like this: |
| 6 | # docker login -u USER -p PASS nexus3.onap.org:10001 |
| 7 | |
| 8 | version: '2.0' |
| 9 | |
| 10 | services: |
| 11 | |
| 12 | cli: |
| 13 | image: ${CLI_IMG_NAME}:${PORTAL_TAG} |
| 14 | environment: |
| 15 | CLI_MODE: 'daemon' |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 16 | ports: |
| 17 | - 8080:80 |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 18 | - 9090:8080 |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 19 | logging: |
| 20 | driver: json-file |
| 21 | |
| 22 | # Config files may use hostname "portal-db" |
| 23 | portal-db: |
| 24 | image: ${DB_IMG_NAME}:${PORTAL_TAG} |
| 25 | environment: |
| 26 | MYSQL_ROOT_PASSWORD: 'Aa123456' |
| 27 | expose: |
| 28 | - 3306 |
| 29 | volumes: |
| 30 | # Just specify a path and let the Engine create a volume |
| 31 | - /var/lib/mysql |
| 32 | logging: |
| 33 | driver: json-file |
| 34 | |
| 35 | # An environment variable here CAN override the database URL; |
| 36 | # instead the value in the config file uses hostname from above |
| 37 | portal-wms: |
| 38 | image: ${WMS_IMG_NAME}:${PORTAL_TAG} |
| 39 | expose: |
| 40 | - 8082 |
| 41 | links: |
| 42 | - portal-db |
| 43 | depends_on: |
| 44 | - portal-db |
| 45 | volumes: |
| 46 | - ${PROPS_DIR}/ECOMPWIDGETMS/application.properties:/application.properties |
| 47 | command: |
| 48 | - /wait-for.sh |
| 49 | - -t |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 50 | - "420" |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 51 | - portal-db:3306 |
| 52 | - -- |
| 53 | - /start-wms-cmd.sh |
| 54 | logging: |
| 55 | driver: json-file |
| 56 | |
| 57 | # Environment variables here CANNOT override the database URL because |
| 58 | # two apps use identical configuration keys with different values |
| 59 | portal-apps: |
| 60 | image: ${EP_IMG_NAME}:${PORTAL_TAG} |
| 61 | expose: |
| 62 | - 8989 |
| 63 | ports: |
| 64 | - 8989:8080 |
| 65 | - 8010:8009 |
| 66 | - 8006:8005 |
| 67 | links: |
| 68 | - portal-db |
| 69 | - portal-wms |
| 70 | depends_on: |
| 71 | - portal-db |
| 72 | - portal-wms |
| 73 | volumes: |
| 74 | - ${PROPS_DIR}/ECOMPPORTALAPP/system.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/conf/system.properties |
| 75 | - ${PROPS_DIR}/ECOMPPORTALAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties |
| 76 | - ${PROPS_DIR}/ECOMPPORTALAPP/portal.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/portal.properties |
| 77 | - ${PROPS_DIR}/ECOMPPORTALAPP/openid-connect.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties |
| 78 | - ${PROPS_DIR}/ECOMPPORTALAPP/logback.xml:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/logback.xml |
| 79 | - ${PROPS_DIR}/ECOMPSDKAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties |
| 80 | - ${PROPS_DIR}/ECOMPSDKAPP/system.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/conf/system.properties |
| 81 | - ${PROPS_DIR}/ECOMPSDKAPP/portal.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/classes/portal.properties |
| 82 | - ${PROPS_DIR}/ECOMPDBCAPP/system.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/conf/system.properties |
| 83 | - ${PROPS_DIR}/ECOMPDBCAPP/portal.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/classes/portal.properties |
| 84 | - ${PROPS_DIR}/ECOMPDBCAPP/dbcapp.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties |
| 85 | - ${PROPS_DIR}/ECOMPDBCAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties |
| 86 | - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs |
| 87 | command: |
| 88 | - /wait-for.sh |
| 89 | - -t |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 90 | - "420" |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 91 | - portal-db:3306 |
| 92 | - -- |
| 93 | - /start-apps-cmd.sh |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 94 | # see comments in .env file |
| 95 | - $EXTRA_HOST_IP |
| 96 | - $EXTRA_HOST_NAME |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 97 | logging: |
| 98 | driver: json-file |