File size: 1,438 Bytes
340cbde
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
51
52
53
version: "3.8"
services:
  mariadb:
    image: mariadb:10.5
    environment:
      MYSQL_ROOT_PASSWORD: changeme
      MYSQL_DATABASE: yotter
      MYSQL_USER: yotter
      MYSQL_PASSWORD: changeme
    restart: unless-stopped
    volumes:
      - mysql:/var/lib/mysql
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "--silent"]
  nginx:
    image: ytorg/nginx:latest
    restart: unless-stopped
    environment:
      HOSTNAME: 'changeme.example.com'
      HTTP_PORT: 8080
      YOTTER_ADDRESS: 'http://yotter:5000'
      YTPROXY_ADDRESS: 'http://unix:/var/run/ytproxy/http-proxy.sock'
    ports:
      - "127.0.0.1:8080:8080"
    volumes:
      - "/var/run/ytproxy:/app/socket/"
  ytproxy:
    image: 1337kavin/ytproxy:latest
    restart: unless-stopped
    volumes:
      - "/var/run/ytproxy:/app/socket/"
    network_mode: host
  yotter:
    image: ytorg/yotter:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:5000:5000"
    environment:
      DATABASE_URL: mysql+pymysql://yotter:changeme@mariadb:3306/yotter
    depends_on:
      - mariadb
      - ytproxy
    volumes:
      - migrations:/usr/src/app/migrations
      - ./yotter-config.json:/usr/src/app/yotter-config.json
    healthcheck:
      test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:5000"]
      interval: 1m
      timeout: 3s
volumes:
  mysql:
  migrations: