aboutsummaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: cacc13c3609484dca71f5c99cf768192ccf622d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: "3.8"

services:
  kitchen:
    build:
      context: .
    ports:
    - "8080:8080"
    depends_on:
      kitchen_db:
        condition: service_healthy
    environment:
      - DATABASE=kitchen
      - DATABASE_USER=kitchen
      - DATABASE_PASS=kitchen
      - DATABASE_HOST=kitchen_db
      - JWT_SECRET=something_secret
  kitchen_db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    environment:
      - MYSQL_USER=kitchen
      - MYSQL_PASSWORD=kitchen
      - MYSQL_ROOT_PASSWORD=kitchen
      - MYSQL_DATABASE=kitchen
    volumes:
      - kitchen-db:/var/lib/mysql
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
      timeout: 20s
      retries: 10
  games:
    image: games
    ports:
    - "8081:8080"
    environment:
      - DATABASE=kitchen
      - JWT_SECRET=something_secret

volumes:
  kitchen-db: