docker-compose.yml 1.75 KB
Newer Older
TonyFord's avatar
TonyFord committed
1
2
3
version: '3.3'

services:
TonyFord's avatar
TonyFord committed
4

TonyFord's avatar
TonyFord committed
5
6
  explorer:
    restart: always
TonyFord's avatar
TonyFord committed
7
    build:
TonyFord's avatar
TonyFord committed
8
      context: services/explorer
TonyFord's avatar
TonyFord committed
9
      args:
TonyFord's avatar
TonyFord committed
10
11
12
13
        RUNNER_UID: ${RUNNER_UID:-1000}
        RUNNER_GID: ${RUNNER_GID:-1000}
    environment:
      AUTOSTART: ${AUTOSTART:-1}
TonyFord's avatar
TonyFord committed
14
    env_file:
TonyFord's avatar
TonyFord committed
15
16
17
18
19
20
      - ${FAIRCHAINS_CONF}
    container_name: explorer-app
    user: '${RUNNER_UID:-1000}:${RUNNER_GID:-1000}'
    # command: sleep inf
    ports:
      - ${LH_PORT_explorer:-8222}:8222
TonyFord's avatar
TonyFord committed
21
22
    depends_on:
      - db
TonyFord's avatar
TonyFord committed
23
      - faircoin
TonyFord's avatar
TonyFord committed
24
    volumes:
TonyFord's avatar
TonyFord committed
25
      - ./services/explorer:/home/faircoin/explorer
TonyFord's avatar
TonyFord committed
26
27
28

  db:
    restart: always
TonyFord's avatar
TonyFord committed
29
30
31
    build:
      context: services/db
    container_name: explorer-db
TonyFord's avatar
TonyFord committed
32
    environment:
TonyFord's avatar
TonyFord committed
33
      MYSQL_DATABASE: explorer
TonyFord's avatar
TonyFord committed
34
      # So you don't have to use root, but you can if you like
TonyFord's avatar
TonyFord committed
35
      MYSQL_USER: ${MYSQL_USER:-user}
TonyFord's avatar
TonyFord committed
36
      # You can use whatever password you like
TonyFord's avatar
TonyFord committed
37
      MYSQL_PASSWORD: ${MYSQL_PASSWORD:-password}
TonyFord's avatar
TonyFord committed
38
      # Password for root access
TonyFord's avatar
TonyFord committed
39
40
41
42
43
44
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-rootpassword}
    #ports:
    #  - ${MYSQL_DATABASE_PORT:-3306}:3306
    volumes:
      - db:/var/lib/mysql
      - ./services/db:/opt/explorer
TonyFord's avatar
ts    
TonyFord committed
45

TonyFord's avatar
TonyFord committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
  faircoin:
    restart: always
    build:
      context: services/faircoin
      args:
        source_repository: "https://github.com/faircoin/faircoin.git"
        RUNNER_UID: "${RUNNER_UID:-1000}"
        RUNNER_GID: "${RUNNER_GID:-1000}"
    environment:
      AUTOSTART: ${AUTOSTART:-1}
    env_file:
      - ${FAIRCHAINS_CONF}
    container_name: explorer-faircoind
    user: "${RUNNER_UID:-1000}:${RUNNER_GID:-1000}"
    stop_grace_period: 30s
TonyFord's avatar
TonyFord committed
61
    volumes:
TonyFord's avatar
TonyFord committed
62
63
64
65
      - fairchains:/home/faircoin/.faircoin2
      - ./services/faircoin/scripts:/home/faircoin/scripts
      - ./services/explorer:/home/faircoin/explorer

TonyFord's avatar
TonyFord committed
66
67
# Names our volume
volumes:
TonyFord's avatar
TonyFord committed
68
69
  fairchains:
  db: