Projekt

Obecné

Profil

Stáhnout (1.4 KB) Statistiky
| Větev: | Tag: | Revize:
1
version: '3.3'
2

    
3
services:
4
  #service 1: definition of mysql database
5
  db:
6
    image: mysql:latest
7
    container_name: mysql-db
8
    environment:
9
      - MYSQL_ROOT_PASSWORD=testtest
10
      - MYSQL_USER=root
11
    ports:
12
      - "3306:3306"
13
    restart: always
14

    
15

    
16
  #service 2: definition of phpMyAdmin
17
  phpmyadmin:
18
    image: phpmyadmin/phpmyadmin:latest
19
    container_name: my-php-myadmin
20
    ports:
21
      - "8082:80"
22
    restart: always
23

    
24
    depends_on:
25
      - db
26
    environment:
27
      SPRING_DATASOURCE_USERNAME: root
28
      SPRING_DATASOURCE_PASSWORD: testtest
29

    
30

    
31

    
32
  #service 3: definition of your spring-boot app
33
  antipatterndetection:
34
    image: anti-pattern-detection               #name of the image after dockerfile executes
35
    container_name: anti-pattern-detection-app
36
    build:
37
      context: .                          #docker file path (. means root directory)
38
      dockerfile: Dockerfile              #docker file name
39
    ports:
40
      - "8080:8080"                       #docker containter port with your os port
41
    restart: always
42

    
43
    depends_on:                           #define dependencies of this app
44
      - db                                #dependency name (which is defined with this name 'db' in this file earlier)
45
    environment:
46
      SPRING_DATASOURCE_URL: jdbc:mysql://mysql-db:3306/ppicha?createDatabaseIfNotExist=true
47
      SPRING_DATASOURCE_USERNAME: root
48
      SPRING_DATASOURCE_PASSWORD: testtest
(4-4/7)