blob: 096695a4fd0d4a2b006d824f9595a8f4e5a5e2a6 [file] [log] [blame]
# 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: '3.1'
services:
portal-db:
image: mariadb
# image: mysql
container_name: portal_mariaDB
ports:
- 3306:3306
restart: always
environment:
- MYSQL_DATABASE=testdb
- MYSQL_USER=${spring_datasource_username}
- MYSQL_PASSWORD=${spring_datasource_password}
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_INITDB_SKIP_TZINFO=1
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
networks:
- backend
portal-app:
image: portal_app
container_name: portal_APP
restart: always
ports:
- 8081:8081
environment:
- spring.datasource.username=${spring_datasource_username}
- spring.datasource.password=${spring_datasource_password}
depends_on:
- portal-db
networks:
- backend
networks:
backend:
driver: bridge