aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans/portal-sdk/testsuite/docker-compose.yml
blob: dda74c91aab2a5b49301a6daa9e04677e7d99431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# docker-compose for ONAP portal containers: database, microservice, portal apps.
# Relies on .env file, which CANNOT be specified via command-line option
# Works in multiple environments; does not pull from a Nexus registry.
# Exposes the portal apps docker (but not DB nor WMS dockers) on the host network.
# Images must be pulled from ONAP Nexus registry after logging in like this:
# docker login -u USER -p PASS nexus3.onap.org:10001
# Uses healthcheck feature added in docker-compose v2.1

version: '2.1'

services:

  cli:
    image: ${CLI_IMG_NAME}:${PORTAL_TAG}
    environment:
      CLI_MODE: 'daemon'
    ports:
      - 8080:80
      - 9090:8080
    logging:
      driver: json-file

  # Config files may use hostname "portal-db"
  portal-db:
    image: ${DB_IMG_NAME}:${PORTAL_TAG}
    environment:
      MYSQL_ROOT_PASSWORD: 'Aa123456'
    expose:
      - 3306
    volumes:
      # Just specify a path and let the Engine create a volume
      - /var/lib/mysql
      # Inject the onboarding script at start time
      - ./Apps_Users_OnBoarding_Script.sql:/docker-entrypoint-initdb.d/zzz_apps_users_onboarding.sql
    logging:
      driver: json-file
    healthcheck:
      test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
      timeout: 10s
      retries: 30
      
  # Config files may use hostname "portal-cassandra"
  portal-cassandra:
    image: ${CDR_IMG_NAME}:${PORTAL_TAG}
    environment:
      - CASSUSER=root
      - CASSPASS=Aa123456
    expose:
      - 7000
      - 7001
      - 7199
      - 9042
      - 9160
    ports:
      - 7000:7000
      - 7001:7001
      - 7199:7199
      - 9042:9042
      - 9160:9160
    volumes:
      - ./portal.cql:/docker-entrypoint-initdb.d/zzz_portal.cql
      - ./portalsdk.cql:/docker-entrypoint-initdb.d/zzz_portalsdk.cql
    links:
      - portal-db      
    depends_on:
      portal-db:
        condition: service_healthy
        
  # Config files may use hostname "portal-zk"
  portal-zk:
    image: ${ZK_IMG_NAME}:${PORTAL_TAG}
    expose:
      - 2181
    ports:
      - 2181:2181           

  # The app config file uses the docker name above
  portal-wms:
    image: ${WMS_IMG_NAME}:${PORTAL_TAG}
    expose:
      - 8082
    links:
      - portal-db
    depends_on:
      portal-db:
        condition: service_healthy
    volumes:
      - ${PROPS_DIR}/ONAPWIDGETMS/application.properties:/application.properties
      - ${PROPS_DIR}/ONAPWIDGETMS/application.yml:/application.yml
    command:
      - /start-wms.sh
    logging:
      driver: json-file

  portal-app:
    image: ${EP_IMG_NAME}:${PORTAL_TAG}
    ports:
      - 8989:8080
      - 8010:8009
      - 8006:8005
    links:
      - portal-db
      - portal-wms
      - portal-zk
      - portal-cassandra
    depends_on:
      portal-db:
        condition: service_healthy
      portal-wms:
        condition: service_started
    volumes:
      - ${PROPS_DIR}/ONAPPORTAL/system.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/conf/system.properties
      - ${PROPS_DIR}/ONAPPORTAL/fusion.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties
      - ${PROPS_DIR}/ONAPPORTAL/portal.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/portal.properties
      - ${PROPS_DIR}/ONAPPORTAL/music.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/music.properties
      - ${PROPS_DIR}/ONAPPORTAL/openid-connect.properties:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties
      - ${PROPS_DIR}/ONAPPORTAL/logback.xml:${WEBAPPS_DIR}/ONAPPORTAL/WEB-INF/classes/logback.xml
      - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs
    command:
      - /start-apache-tomcat.sh
      # see comments in .env file
      - -i
      - $EXTRA_HOST_IP
      - -n
      - $EXTRA_HOST_NAME
    logging:
      driver: json-file

  portal-sdk:
    image: ${SDK_IMG_NAME}:${PORTAL_TAG}
    ports:
      - 8990:8080
    links:
      - portal-db
      - portal-wms
      - portal-zk
      - portal-cassandra
    depends_on:
      portal-db:
        condition: service_healthy
    volumes:
      - ${PROPS_DIR}/ONAPPORTALSDK/fusion.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties
      - ${PROPS_DIR}/ONAPPORTALSDK/system.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/conf/system.properties
      - ${PROPS_DIR}/ONAPPORTALSDK/portal.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/portal.properties
      - ${PROPS_DIR}/ONAPPORTALSDK/music.properties:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/music.properties
      - ${PROPS_DIR}/ONAPPORTALSDK/logback.xml:${WEBAPPS_DIR}/ONAPPORTALSDK/WEB-INF/classes/logback.xml
      - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs
    command:
      - /start-apache-tomcat.sh
    logging:
      driver: json-file