kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 1 | # docker-compose for ONAP portal containers: database, microservice, portal apps. |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 2 | # Relies on .env file, which CANNOT be specified via command-line option |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 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 |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 7 | # Uses healthcheck feature added in docker-compose v2.1 |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 8 | |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 9 | version: '2.1' |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 10 | |
| 11 | services: |
| 12 | |
| 13 | cli: |
| 14 | image: ${CLI_IMG_NAME}:${PORTAL_TAG} |
| 15 | environment: |
| 16 | CLI_MODE: 'daemon' |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 17 | ports: |
| 18 | - 8080:80 |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 19 | - 9090:8080 |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 20 | logging: |
| 21 | driver: json-file |
| 22 | |
| 23 | # Config files may use hostname "portal-db" |
| 24 | portal-db: |
| 25 | image: ${DB_IMG_NAME}:${PORTAL_TAG} |
| 26 | environment: |
| 27 | MYSQL_ROOT_PASSWORD: 'Aa123456' |
| 28 | expose: |
| 29 | - 3306 |
| 30 | volumes: |
| 31 | # Just specify a path and let the Engine create a volume |
| 32 | - /var/lib/mysql |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 33 | # Inject the onboarding script at start time |
| 34 | - ./Apps_Users_OnBoarding_Script.sql:/docker-entrypoint-initdb.d/zzz_apps_users_onboarding.sql |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 35 | logging: |
| 36 | driver: json-file |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 37 | healthcheck: |
| 38 | test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ] |
| 39 | timeout: 10s |
| 40 | retries: 30 |
| 41 | |
| 42 | # Config files may use hostname "portal-cassandra" |
| 43 | portal-cassandra: |
| 44 | image: ${CDR_IMG_NAME}:${PORTAL_TAG} |
| 45 | environment: |
| 46 | - CASSUSER=root |
| 47 | - CASSPASS=Aa123456 |
| 48 | expose: |
| 49 | - 7000 |
| 50 | - 7001 |
| 51 | - 7199 |
| 52 | - 9042 |
| 53 | - 9160 |
| 54 | ports: |
| 55 | - 7000:7000 |
| 56 | - 7001:7001 |
| 57 | - 7199:7199 |
| 58 | - 9042:9042 |
| 59 | - 9160:9160 |
| 60 | volumes: |
| 61 | - ./portal.cql:/docker-entrypoint-initdb.d/zzz_portal.cql |
| 62 | - ./portalsdk.cql:/docker-entrypoint-initdb.d/zzz_portalsdk.cql |
| 63 | links: |
| 64 | - portal-db |
| 65 | depends_on: |
| 66 | portal-db: |
| 67 | condition: service_healthy |
| 68 | |
| 69 | # Config files may use hostname "portal-zk" |
| 70 | portal-zk: |
| 71 | image: ${ZK_IMG_NAME}:${PORTAL_TAG} |
| 72 | expose: |
| 73 | - 2181 |
| 74 | ports: |
| 75 | - 2181:2181 |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 76 | |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 77 | # The app config file uses the docker name above |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 78 | portal-wms: |
| 79 | image: ${WMS_IMG_NAME}:${PORTAL_TAG} |
| 80 | expose: |
| 81 | - 8082 |
| 82 | links: |
| 83 | - portal-db |
| 84 | depends_on: |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 85 | portal-db: |
| 86 | condition: service_healthy |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 87 | volumes: |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 88 | - ${PROPS_DIR}/ONAPWIDGETMS/application.properties:/application.properties |
| 89 | - ${PROPS_DIR}/ONAPWIDGETMS/application.yml:/application.yml |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 90 | command: |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 91 | - /start-wms.sh |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 92 | logging: |
| 93 | driver: json-file |
| 94 | |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 95 | portal-app: |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 96 | image: ${EP_IMG_NAME}:${PORTAL_TAG} |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 97 | ports: |
| 98 | - 8989:8080 |
| 99 | - 8010:8009 |
| 100 | - 8006:8005 |
| 101 | links: |
| 102 | - portal-db |
| 103 | - portal-wms |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 104 | - portal-zk |
| 105 | - portal-cassandra |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 106 | depends_on: |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 107 | portal-db: |
| 108 | condition: service_healthy |
| 109 | portal-wms: |
| 110 | condition: service_started |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 111 | volumes: |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 112 | - ${PROPS_DIR}/ONAPPORTAL/system.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/conf/system.properties |
| 113 | - ${PROPS_DIR}/ONAPPORTAL/fusion.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties |
| 114 | - ${PROPS_DIR}/ONAPPORTAL/portal.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/portal.properties |
| 115 | - ${PROPS_DIR}/ONAPPORTAL/music.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/music.properties |
| 116 | - ${PROPS_DIR}/ONAPPORTAL/openid-connect.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties |
| 117 | - ${PROPS_DIR}/ONAPPORTAL/logback.xml:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/logback.xml |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 118 | - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs |
| 119 | command: |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 120 | - /start-apache-tomcat.sh |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 121 | # see comments in .env file |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 122 | - -i |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 123 | - $EXTRA_HOST_IP |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 124 | - -n |
kishore | 92d70d6 | 2017-10-11 14:51:31 -0500 | [diff] [blame] | 125 | - $EXTRA_HOST_NAME |
kishore | 6eebdba | 2017-10-03 11:12:57 -0500 | [diff] [blame] | 126 | logging: |
| 127 | driver: json-file |
CHINTAMANI | 68e9836 | 2018-04-10 18:56:38 -0400 | [diff] [blame] | 128 | |
| 129 | portal-sdk: |
| 130 | image: ${SDK_IMG_NAME}:${PORTAL_TAG} |
| 131 | ports: |
| 132 | - 8990:8080 |
| 133 | links: |
| 134 | - portal-db |
| 135 | - portal-wms |
| 136 | - portal-zk |
| 137 | - portal-cassandra |
| 138 | depends_on: |
| 139 | portal-db: |
| 140 | condition: service_healthy |
| 141 | volumes: |
| 142 | - ${PROPS_DIR}/ONAPPORTALSDK/fusion.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties |
| 143 | - ${PROPS_DIR}/ONAPPORTALSDK/system.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/conf/system.properties |
| 144 | - ${PROPS_DIR}/ONAPPORTALSDK/portal.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/portal.properties |
| 145 | - ${PROPS_DIR}/ONAPPORTALSDK/music.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/music.properties |
| 146 | - ${PROPS_DIR}/ONAPPORTALSDK/logback.xml:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/logback.xml |
| 147 | - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs |
| 148 | command: |
| 149 | - /start-apache-tomcat.sh |
| 150 | logging: |
| 151 | driver: json-file |