docker-compose.yaml 462 Bytes
Newer Older
1
2
3
4
5
version: "3.7"
services:
  backend:
    build: backend
    ports:
6
      - 8080:8080
7
    secrets:
8
      - db-password
9
  db:
Guillaume Lours's avatar
Guillaume Lours committed
10
    image: mysql:8.0.19
11
12
    restart: always
    secrets:
13
      - db-password
14
    volumes:
15
16
17
18
      - db-data:/var/lib/mysql
    environment:
      - MYSQL_DATABASE=example
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
19
20
21
    expose:
      - 3306
      - 33060   
22
volumes:
23
  db-data:
24
25
26
secrets:
  db-password:
    file: db/password.txt