summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: a89b726016d8797bbf6e3ab409c0ddce70889e94 (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
version: "3"
services:
  frontend:
    build: ./
    image: frontend
    restart: on-failure
    ports:
      - "8081:8081"
    links:
      - mariadb
    depends_on:
      - mariadb
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
  simulator:
    build:
        context: ./opendc-simulator
        dockerfile: opendc-model-odc/setup/Dockerfile
    image: simulator
    restart: on-failure
    links:
      - mariadb
    depends_on:
      - mariadb
    environment:
      - PERSISTENCE_URL=jdbc:mysql://mariadb:3306/opendc
      - PERSISTENCE_USER=opendc
      - PERSISTENCE_PASSWORD=opendcpassword
  mariadb:
    build:
        context: ./database
    image: database
    restart: on-failure
    ports:
      - "3306:3306" # comment this line out in production
    environment:
      - MYSQL_DATABASE=opendc
      - MYSQL_USER=opendc
      - MYSQL_PASSWORD=opendcpassword
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
    # uncomment in production
    # volumes:
    #   - "/data/mariadb:/var/lib/mysql"