docker-compose.yaml 597 Bytes
Newer Older
1
2
3
4
5
version: "3.7"
services:
  backend:
    build: backend
    secrets:
6
      - db-password
7
    depends_on: 
8
      - db
9
  db:
10
11
    image: mysql:8.0.19
    command: '--default-authentication-plugin=mysql_native_password'
12
13
    restart: always
    secrets:
14
      - db-password
15
    volumes:
16
17
18
19
      - db-data:/var/lib/mysql
    environment:
      - MYSQL_DATABASE=example
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db-password
20
21
    expose:
      - 3306
22
23
24
  proxy:
    build: proxy
    ports:
25
      - 80:80
26
    depends_on: 
27
      - backend
28
volumes:
29
  db-data:
30
31
32
secrets:
  db-password:
    file: db/password.txt