This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
93 lines (86 loc) · 2.34 KB
/
docker-compose.yml
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
version: '3.7'
volumes:
explorer_client_node_modules_volume:
explorer_server_node_modules_volume:
services:
proxy:
image: jwilder/nginx-proxy
ports:
- 80:80
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
dockerhost:
image: qoomon/docker-host
cap_add: ['NET_ADMIN', 'NET_RAW']
restart: on-failure
site:
build:
context: ./client
target: dev
volumes:
- ./client:/usr/src/app
- explorer_client_node_modules_volume:/usr/src/app/node_modules
depends_on:
- server
links:
- server
ports:
- '3000:3000'
command: yarn start
environment:
NODE_ENV: development
FORCE_COLOR: 1
VIRTUAL_HOST: site.localtest.me
VIRTUAL_PORT: 3000
REACT_APP_API_URL: http://server.localtest.me/api
REACT_APP_NETWORK: testnet
REACT_APP_EXPLORER_PREFIX: https://filscan.io/
server:
build:
context: ./server
target: dev
volumes:
- ./server:/usr/src/app
- explorer_server_node_modules_volume:/usr/src/app/node_modules
ports:
- '8888:8888'
depends_on:
- dockerhost
- db
links:
- dockerhost
- db
environment:
NODE_ENV: development
FORCE_COLOR: 1
HOST: 0.0.0.0
PORT: 8888
SLATE_URL: http://192.168.1.120:4000/api
VIRTUAL_HOST: server.localtest.me
VIRTUAL_PORT: 8888
DATABASE_URL: postgres://user:password@db/lotus
#DATABASE_URL: postgres://u1uctel078otia:pc9971b37ea081163da68744741770ea218ffc98ac459c2de03fffc00e7eaacb2@ec2-3-224-134-18.compute-1.amazonaws.com:5432/d7j8iof2h9bdi
DATABASE_SSL: 'false'
DATABASE_POOL_MIN: 0
DATABASE_POOL_MAX: 10
db:
image: postgres:10.4
ports:
- '5432:5432'
command: postgres -D /run/pgsql-10.4-data -c logging_collector=on
volumes:
- ./api/db/local_database_volume:/run/pgsql-10.4-data
#- ./1.init.sql:/docker-entrypoint-initdb.d/1.init.sql
#- ./2.create-views.sql:/docker-entrypoint-initdb.d/2.create-views.sql
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
environment:
COMPOSE_HTTP_TIMEOUT: 200
LOGGING_COLLECTOR: 'on'
PGDATA: /run/pgsql-10.4-data
POSTGRES_DB: lotus
POSTGRES_PASSWORD: password
POSTGRES_USER: user