docker-compose.yml 1.01 KB
Newer Older
Anatolii Koval's avatar
Anatolii Koval committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
version: '2'
volumes:
  partons-mysql-data:
    driver: local

services:
  mysql:
    build:
      context: .
      dockerfile: .docker/Dockerfile.mysql
    restart: 'no'
    volumes:
      - "partons-mysql-data:/var/lib/mysql"
    environment:
      MYSQL_DATABASE: 'partons'
      MYSQL_USER: 'partons'
      MYSQL_PASSWORD: 'partons'

19
  shell:
Anatolii Koval's avatar
Anatolii Koval committed
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    build:
      context: .
      dockerfile: .docker/Dockerfile.partons
    restart: 'no'
    depends_on:
      - mysql
    volumes:
      - ".:/root/workspace/partons-example"
    command: /bin/bash

  compile:
    build:
      context: .
      dockerfile: .docker/Dockerfile.partons
    restart: 'no'
    volumes:
      - ".:/root/workspace/partons-example"
      - ".docker/scripts:/root/scripts"
    command: /bin/bash /root/scripts/compile_example.sh
39
40
41
42
43

  partons:
    build:
      context: .
      dockerfile: .docker/Dockerfile.partons
44
45
    depends_on:
      - mysql
46
47
48
49
    restart: 'no'
    volumes:
      - ".:/root/workspace/partons-example"
      - ".docker/scripts:/root/scripts"