Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 1 | # docker-compose for ONAP portal containers: database, microservice, portal apps. |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 2 | # Relies on .env file, which CANNOT be specified via command-line option |
Christopher Lott (cl778h) | 51d8315 | 2017-09-28 11:18:14 -0400 | [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 |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 7 | # Uses healthcheck feature added in docker-compose v2.1 |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 8 | |
Christopher Lott (cl778h) | ec4eb9c | 2017-10-11 11:42:04 -0400 | [diff] [blame] | 9 | version: '2.1' |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 10 | |
| 11 | services: |
| 12 | |
Kanagaraj Manickam k00365106 | bfbe335 | 2017-08-30 09:33:23 +0530 | [diff] [blame] | 13 | cli: |
Christopher Lott (cl778h) | 0acb4fc | 2017-10-02 12:09:24 -0400 | [diff] [blame] | 14 | image: ${CLI_IMG_NAME}:${PORTAL_TAG} |
Kanagaraj Manickam k00365106 | bfbe335 | 2017-08-30 09:33:23 +0530 | [diff] [blame] | 15 | environment: |
Kanagaraj Manickam k00365106 | bdbb16a | 2018-04-19 14:11:24 +0530 | [diff] [blame] | 16 | OPEN_CLI_MODE: 'daemon' |
Kanagaraj Manickam k00365106 | bfbe335 | 2017-08-30 09:33:23 +0530 | [diff] [blame] | 17 | ports: |
| 18 | - 8080:80 |
Kanagaraj Manickam k00365106 | fefebed | 2017-10-05 14:42:52 +0530 | [diff] [blame] | 19 | - 9090:8080 |
Kanagaraj Manickam k00365106 | bfbe335 | 2017-08-30 09:33:23 +0530 | [diff] [blame] | 20 | logging: |
| 21 | driver: json-file |
| 22 | |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 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 |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [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 |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 35 | logging: |
| 36 | driver: json-file |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 37 | healthcheck: |
| 38 | test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ] |
| 39 | timeout: 10s |
| 40 | retries: 30 |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 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 |
st782s | 2e89d1f | 2018-05-03 16:15:58 -0400 | [diff] [blame] | 48 | - JVM_OPTS=-Xmx2536m -Xms2536m |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 49 | expose: |
| 50 | - 7000 |
| 51 | - 7001 |
| 52 | - 7199 |
| 53 | - 9042 |
| 54 | - 9160 |
| 55 | ports: |
| 56 | - 7000:7000 |
| 57 | - 7001:7001 |
| 58 | - 7199:7199 |
| 59 | - 9042:9042 |
| 60 | - 9160:9160 |
| 61 | volumes: |
| 62 | - ./portal.cql:/docker-entrypoint-initdb.d/zzz_portal.cql |
| 63 | - ./portalsdk.cql:/docker-entrypoint-initdb.d/zzz_portalsdk.cql |
| 64 | links: |
| 65 | - portal-db |
| 66 | depends_on: |
| 67 | portal-db: |
| 68 | condition: service_healthy |
| 69 | |
| 70 | # Config files may use hostname "portal-zk" |
| 71 | portal-zk: |
| 72 | image: ${ZK_IMG_NAME}:${PORTAL_TAG} |
| 73 | expose: |
| 74 | - 2181 |
| 75 | ports: |
| 76 | - 2181:2181 |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 77 | |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 78 | # The app config file uses the docker name above |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 79 | portal-wms: |
| 80 | image: ${WMS_IMG_NAME}:${PORTAL_TAG} |
| 81 | expose: |
| 82 | - 8082 |
| 83 | links: |
| 84 | - portal-db |
| 85 | depends_on: |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 86 | portal-db: |
| 87 | condition: service_healthy |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 88 | volumes: |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 89 | - ${PROPS_DIR}/ONAPWIDGETMS/application.properties:/application.properties |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 90 | - ${PROPS_DIR}/ONAPWIDGETMS/application.yml:/application.yml |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 91 | command: |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 92 | - /start-wms.sh |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 93 | logging: |
| 94 | driver: json-file |
| 95 | |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 96 | portal-app: |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 97 | image: ${EP_IMG_NAME}:${PORTAL_TAG} |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 98 | ports: |
| 99 | - 8989:8080 |
| 100 | - 8010:8009 |
| 101 | - 8006:8005 |
Kishore Reddy, Gujja (kg811t) | a59bc3e | 2018-09-25 13:59:56 -0400 | [diff] [blame] | 102 | - 8443:8443 |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 103 | links: |
| 104 | - portal-db |
| 105 | - portal-wms |
st782s | 7c63110 | 2018-04-07 05:18:34 -0400 | [diff] [blame] | 106 | - portal-zk |
| 107 | - portal-cassandra |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 108 | depends_on: |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 109 | portal-db: |
| 110 | condition: service_healthy |
| 111 | portal-wms: |
| 112 | condition: service_started |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 113 | volumes: |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 114 | - ${PROPS_DIR}/ONAPPORTAL/system.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/conf/system.properties |
| 115 | - ${PROPS_DIR}/ONAPPORTAL/fusion.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties |
| 116 | - ${PROPS_DIR}/ONAPPORTAL/portal.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/portal.properties |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 117 | - ${PROPS_DIR}/ONAPPORTAL/music.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/music.properties |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 118 | - ${PROPS_DIR}/ONAPPORTAL/openid-connect.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties |
| 119 | - ${PROPS_DIR}/ONAPPORTAL/logback.xml:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/logback.xml |
Kishore Reddy, Gujja (kg811t) | a59bc3e | 2018-09-25 13:59:56 -0400 | [diff] [blame] | 120 | - ./${TOMCAT_TRUST}:${TOMCAT_DIR}/${TOMCAT_TRUST} |
| 121 | - ./${TOMCAT_KEY}:${TOMCAT_DIR}/${TOMCAT_KEY} |
| 122 | - ${LOGS_DIR}:${TOMCAT_DIR}/logs |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 123 | command: |
| 124 | - /start-apache-tomcat.sh |
| 125 | # see comments in .env file |
| 126 | - -i |
| 127 | - $EXTRA_HOST_IP |
| 128 | - -n |
| 129 | - $EXTRA_HOST_NAME |
| 130 | logging: |
| 131 | driver: json-file |
st782s | 2e89d1f | 2018-05-03 16:15:58 -0400 | [diff] [blame] | 132 | environment: |
| 133 | - CATALINA_OPTS=-Xmx1536m -Xms1536m |
Kishore Reddy, Gujja (kg811t) | a59bc3e | 2018-09-25 13:59:56 -0400 | [diff] [blame] | 134 | - javax.net.ssl.keyStore=${TOMCAT_DIR}/${TOMCAT_TRUST} |
| 135 | - javax.net.ssl.keyStorePassword=${CERT_PWD} |
| 136 | - javax.net.ssl.trustStore=${TOMCAT_DIR}/${TOMCAT_TRUST} |
| 137 | - javax.net.ssl.trustStorePassword=${CERT_PWD} |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 138 | portal-sdk: |
| 139 | image: ${SDK_IMG_NAME}:${PORTAL_TAG} |
| 140 | ports: |
| 141 | - 8990:8080 |
| 142 | links: |
| 143 | - portal-db |
| 144 | - portal-wms |
st782s | 7c63110 | 2018-04-07 05:18:34 -0400 | [diff] [blame] | 145 | - portal-zk |
| 146 | - portal-cassandra |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 147 | depends_on: |
| 148 | portal-db: |
| 149 | condition: service_healthy |
| 150 | volumes: |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 151 | - ${PROPS_DIR}/ONAPPORTALSDK/fusion.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties |
| 152 | - ${PROPS_DIR}/ONAPPORTALSDK/system.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/conf/system.properties |
| 153 | - ${PROPS_DIR}/ONAPPORTALSDK/portal.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/portal.properties |
Kishore Reddy, Gujja (kg811t) | 4ee8967 | 2018-03-20 17:15:25 -0400 | [diff] [blame] | 154 | - ${PROPS_DIR}/ONAPPORTALSDK/music.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/music.properties |
Sylvain Desbureaux | 3337582 | 2017-10-13 10:33:05 +0200 | [diff] [blame] | 155 | - ${PROPS_DIR}/ONAPPORTALSDK/logback.xml:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/logback.xml |
Kishore Reddy, Gujja (kg811t) | a59bc3e | 2018-09-25 13:59:56 -0400 | [diff] [blame] | 156 | - ${LOGS_DIR}:${TOMCAT_DIR}/logs |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 157 | command: |
st782s | 21a8761 | 2018-01-30 17:29:36 -0500 | [diff] [blame] | 158 | - /start-apache-tomcat.sh |
Christopher Lott (cl778h) | 978dbcf | 2017-08-23 18:27:19 -0400 | [diff] [blame] | 159 | logging: |
| 160 | driver: json-file |
st782s | 2e89d1f | 2018-05-03 16:15:58 -0400 | [diff] [blame] | 161 | environment: |
| 162 | - CATALINA_OPTS=-Xmx1536m -Xms1536m |