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