aboutsummaryrefslogtreecommitdiffstats
path: root/docker-compose-test.yaml
blob: 6b7367a3f5bcb95b2097486d51ea406ee42b1d1a (plain) (blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
services:
  auth:
    image: auth
    build:
      context: ./auth
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    networks:
      - authnet
    restart: unless-stopped
    ports:
      - "127.0.0.1:8091:8090"
    depends_on:
      - nginx
    volumes:
      - pb-vault:/auth/pb_data
    cap_drop:
      - ALL
    environment:
      - SERVER_DEPLOYMENT_TYPE=deployment
    entrypoint: ["/auth/auth"]
    command: ["serve", "--http=0.0.0.0:8090"]
  nginx:
    image: nginx:stable
    deploy:
      resources:
        limits:
          memory: 128M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    ports:
      - "127.0.0.1:8090:443"
    networks:
      - authnet
    restart: unless-stopped
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - DAC_OVERRIDE
      - SETGID
      - SETUID
      - NET_BIND_SERVICE
    volumes:
      - ./auth/nginx.conf:/etc/nginx/nginx.conf:ro
      - ./ss_certs/server.cert:/etc/letsencrypt/live/api.terminaldweller.com/fullchain.pem:ro
      - ./ss_certs/server.key:/etc/letsencrypt/live/api.terminaldweller.com/privkey.pem:ro
  hived:
    image: hived
    build:
      context: ./hived
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    secrets:
      - tg_bot_token
    networks:
      - apinet
      - dbnet
      - telenet
    ports:
      - "127.0.0.1:10008:8008"
    depends_on:
      - keydb
      - telebot
    entrypoint: ["/hived/docker-entrypoint.sh"]
    cap_drop:
      - ALL
    environment:
      - SERVER_DEPLOYMENT_TYPE=test
      - HIVED_PRICE_SOURCE=cmc
      - CMC_API_KEY=
      - POLYGON_API_KEY=
  telebot:
    image: telebot
    build:
      context: ./telebot
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    secrets:
      - tg_bot_token
    networks:
      - telenet
    ports:
      - "127.0.0.1:10009:8000"
    entrypoint: ["/telebot/docker-entrypoint.sh"]
    cap_drop:
      - ALL
    environment:
      - SERVER_DEPLOYMENT_TYPE=test
  arbiter:
    image: arbiter
    build:
      context: ./arbiter
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    networks:
      - apinet
      - dbnet
      - telenet
    ports:
      - "127.0.0.1:8009:8009"
    entrypoint: ["/arbiter/arbiter"]
    cap_drop:
      - ALL
    environment:
      - SERVER_DEPLOYMENT_TYPE=test
  keydb:
    image: eqalpha/keydb:alpine_x86_64_v6.3.4
    deploy:
      resources:
        limits:
          memory: 256M
    logging:
      driver: "json-file"
      options:
        max-size: "100m"
    networks:
      - dbnet
    ports:
      - "127.0.0.1:6380:6379"
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    # volumes:
    #   - keydb-data:/data/
networks:
  authnet:
  dbnet:
  telenet:
  apinet:
secrets:
  tg_bot_token:
    file: ./tgtoken
  polygon_api_key:
    file: ./polygon_api_key
  cmc_api_key:
    file: ./cmc_api_key
volumes:
  keydb-data:
  pb-vault: