blob: dda74c91aab2a5b49301a6daa9e04677e7d99431 [file] [log] [blame]
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -04001# docker-compose for ONAP portal containers: database, microservice, portal apps.
Sylvain Desbureaux33375822017-10-13 10:33:05 +02002# Relies on .env file, which CANNOT be specified via command-line option
Christopher Lott (cl778h)51d83152017-09-28 11:18:14 -04003# 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 Desbureaux33375822017-10-13 10:33:05 +02007# Uses healthcheck feature added in docker-compose v2.1
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -04008
Christopher Lott (cl778h)ec4eb9c2017-10-11 11:42:04 -04009version: '2.1'
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040010
11services:
12
Kanagaraj Manickam k00365106bfbe3352017-08-30 09:33:23 +053013 cli:
Christopher Lott (cl778h)0acb4fc2017-10-02 12:09:24 -040014 image: ${CLI_IMG_NAME}:${PORTAL_TAG}
Kanagaraj Manickam k00365106bfbe3352017-08-30 09:33:23 +053015 environment:
Kanagaraj Manickam k003651063ad7f7b2017-09-11 09:16:36 +053016 CLI_MODE: 'daemon'
Kanagaraj Manickam k00365106bfbe3352017-08-30 09:33:23 +053017 ports:
18 - 8080:80
Kanagaraj Manickam k00365106fefebed2017-10-05 14:42:52 +053019 - 9090:8080
Kanagaraj Manickam k00365106bfbe3352017-08-30 09:33:23 +053020 logging:
21 driver: json-file
22
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040023 # 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
st782s21a87612018-01-30 17:29:36 -050033 # 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)978dbcf2017-08-23 18:27:19 -040035 logging:
36 driver: json-file
Sylvain Desbureaux33375822017-10-13 10:33:05 +020037 healthcheck:
38 test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
39 timeout: 10s
40 retries: 30
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -040041
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
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040076
Sylvain Desbureaux33375822017-10-13 10:33:05 +020077 # The app config file uses the docker name above
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040078 portal-wms:
79 image: ${WMS_IMG_NAME}:${PORTAL_TAG}
80 expose:
81 - 8082
82 links:
83 - portal-db
84 depends_on:
Sylvain Desbureaux33375822017-10-13 10:33:05 +020085 portal-db:
86 condition: service_healthy
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040087 volumes:
Sylvain Desbureaux33375822017-10-13 10:33:05 +020088 - ${PROPS_DIR}/ONAPWIDGETMS/application.properties:/application.properties
st782s21a87612018-01-30 17:29:36 -050089 - ${PROPS_DIR}/ONAPWIDGETMS/application.yml:/application.yml
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040090 command:
st782s21a87612018-01-30 17:29:36 -050091 - /start-wms.sh
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040092 logging:
93 driver: json-file
94
st782s21a87612018-01-30 17:29:36 -050095 portal-app:
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040096 image: ${EP_IMG_NAME}:${PORTAL_TAG}
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -040097 ports:
98 - 8989:8080
99 - 8010:8009
100 - 8006:8005
101 links:
102 - portal-db
103 - portal-wms
st782s7c631102018-04-07 05:18:34 -0400104 - portal-zk
105 - portal-cassandra
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -0400106 depends_on:
Sylvain Desbureaux33375822017-10-13 10:33:05 +0200107 portal-db:
108 condition: service_healthy
109 portal-wms:
110 condition: service_started
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -0400111 volumes:
Sylvain Desbureaux33375822017-10-13 10:33:05 +0200112 - ${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
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -0400115 - ${PROPS_DIR}/ONAPPORTAL/music.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/music.properties
Sylvain Desbureaux33375822017-10-13 10:33:05 +0200116 - ${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
st782s21a87612018-01-30 17:29:36 -0500118 - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs
119 command:
120 - /start-apache-tomcat.sh
121 # see comments in .env file
122 - -i
123 - $EXTRA_HOST_IP
124 - -n
125 - $EXTRA_HOST_NAME
126 logging:
127 driver: json-file
128
129 portal-sdk:
130 image: ${SDK_IMG_NAME}:${PORTAL_TAG}
131 ports:
132 - 8990:8080
133 links:
134 - portal-db
135 - portal-wms
st782s7c631102018-04-07 05:18:34 -0400136 - portal-zk
137 - portal-cassandra
st782s21a87612018-01-30 17:29:36 -0500138 depends_on:
139 portal-db:
140 condition: service_healthy
141 volumes:
Sylvain Desbureaux33375822017-10-13 10:33:05 +0200142 - ${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
Kishore Reddy, Gujja (kg811t)4ee89672018-03-20 17:15:25 -0400145 - ${PROPS_DIR}/ONAPPORTALSDK/music.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/music.properties
Sylvain Desbureaux33375822017-10-13 10:33:05 +0200146 - ${PROPS_DIR}/ONAPPORTALSDK/logback.xml:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/logback.xml
Christopher Lott (cl778h)de8b8df2017-09-28 16:59:17 -0400147 - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -0400148 command:
st782s21a87612018-01-30 17:29:36 -0500149 - /start-apache-tomcat.sh
Christopher Lott (cl778h)978dbcf2017-08-23 18:27:19 -0400150 logging:
151 driver: json-file