aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit/plans/portal/testsuite/docker-compose.yml
blob: 7a9fb8caa3acc1d7b5c8d3fbd8b56b04131f9ae4 (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
# docker-compose for ONAP portal containers: database, microservice, portal apps.
# Relies on .env file in current directory.
# 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

version: '2.0'

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
    logging:
      driver: json-file

  # An environment variable here CAN override the database URL;
  # instead the value in the config file uses hostname from above
  portal-wms:
    image: ${WMS_IMG_NAME}:${PORTAL_TAG}
    expose:
      - 8082
    links:
      - portal-db
    depends_on:
      - portal-db
    volumes:
      - ${PROPS_DIR}/ECOMPWIDGETMS/application.properties:/application.properties
    command:
      - /wait-for.sh
      - -t
      - "420"
      - portal-db:3306
      - --
      - /start-wms-cmd.sh
    logging:
      driver: json-file

  # Environment variables here CANNOT override the database URL because
  # two apps use identical configuration keys with different values
  portal-apps:
    image: ${EP_IMG_NAME}:${PORTAL_TAG}
    expose:
      - 8989
    ports:
      - 8989:8080
      - 8010:8009
      - 8006:8005
    links:
      - portal-db
      - portal-wms
    depends_on:
      - portal-db
      - portal-wms
    volumes:
      - ${PROPS_DIR}/ECOMPPORTALAPP/system.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/conf/system.properties
      - ${PROPS_DIR}/ECOMPPORTALAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties
      - ${PROPS_DIR}/ECOMPPORTALAPP/portal.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/portal.properties
      - ${PROPS_DIR}/ECOMPPORTALAPP/openid-connect.properties:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties
      - ${PROPS_DIR}/ECOMPPORTALAPP/logback.xml:${WEBAPPS_DIR}/ECOMPPORTAL/WEB-INF/classes/logback.xml
      - ${PROPS_DIR}/ECOMPSDKAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties
      - ${PROPS_DIR}/ECOMPSDKAPP/system.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/conf/system.properties
      - ${PROPS_DIR}/ECOMPSDKAPP/portal.properties:${WEBAPPS_DIR}/ECOMPSDKAPP/WEB-INF/classes/portal.properties
      - ${PROPS_DIR}/ECOMPDBCAPP/system.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/conf/system.properties
      - ${PROPS_DIR}/ECOMPDBCAPP/portal.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/classes/portal.properties
      - ${PROPS_DIR}/ECOMPDBCAPP/dbcapp.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties
      - ${PROPS_DIR}/ECOMPDBCAPP/fusion.properties:${WEBAPPS_DIR}/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties
      - ${LOGS_DIR}:/opt/apache-tomcat-8.0.37/logs
    command:
      - /wait-for.sh
      - -t
      - "420"
      - portal-db:3306
      - --
      - /start-apps-cmd.sh
      # see comments in .env file
      - $EXTRA_HOST_IP
      - $EXTRA_HOST_NAME
    logging:
      driver: json-file
;tag>${project.docker.latestfulltag.version}</tag> <tag>${project.docker.latesttagtimestamp.version}</tag> </tags> </build> </image> </images> </configuration> <executions> <execution> <id>generate-images</id> <phase>process-sources</phase> <goals> <goal>build</goal> </goals> </execution> <execution> <id>push-images</id> <phase>deploy</phase> <goals> <goal>build</goal> <goal>push</goal> </goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>copy-dockerfile</id> <goals> <goal>copy-resources</goal> </goals><!-- here the phase you need --> <phase>validate</phase> <configuration> <outputDirectory>${basedir}/target/docker-stage</outputDirectory> <resources> <resource> <directory>src/main/docker</directory> <includes> <include>Dockerfile</include> </includes> <filtering>true</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-properties</id> <goals> <goal>copy-resources</goal> </goals><!-- here the phase you need --> <phase>validate</phase> <configuration> <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</outputDirectory> <resources> <resource> <directory>../src/main/properties</directory> <includes> <include>*.properties</include> <include>*.properties.sdnctldb01</include> </includes> <filtering>false</filtering> </resource> </resources> </configuration> </execution> <execution> <id>copy-keystores</id> <goals> <goal>copy-resources</goal> </goals><!-- here the phase you need --> <phase>validate</phase> <configuration> <outputDirectory>${basedir}/target/docker-stage/opt/onap/sdnc/data/stores</outputDirectory> <resources> <resource> <directory>../src/main/stores</directory> <includes> <include>*.p12</include> </includes> <filtering>false</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.5.0</version> <executions> <execution> <id>Unzip admportal</id> <phase>generate-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>/usr/bin/unzip</executable> <arguments> <argument>-d</argument> <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> <argument>../../admportal/target/*.zip</argument> </arguments> </configuration> </execution> <execution> <id>Copy admportal config</id> <phase>generate-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>/bin/cp</executable> <arguments> <argument>../../admportal/config/admportal.json</argument> <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument> </arguments> </configuration> </execution> <execution> <id>Copy admportal config1</id> <phase>generate-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>/bin/cp</executable> <arguments> <argument>../../admportal/config/admportal.log4js.json</argument> <argument>${basedir}/target/docker-stage/opt/onap/sdnc/data/properties</argument> </arguments> </configuration> </execution> <execution> <id>change shell permissions</id> <phase>process-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>/usr/bin/find</executable> <arguments> <argument>${basedir}/target/docker-stage/opt/onap/sdnc</argument> <argument>-name</argument> <argument>*.sh</argument> <argument>-exec</argument> <argument>chmod</argument> <argument>+x</argument> <argument>{}</argument> <argument>;</argument> </arguments> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>