generated from spknetwork/js-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
81 lines (77 loc) · 2.14 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
version: '3.3'
services:
spk-cdn-node: # name of the service
build: .
image: spk-cdn-node # the image to use
container_name: spk-cdn-node # what to label the container for docker ps
ports:
- 4567:4567 # note, we're mapping to port 80 instead of 5000 because we'll use 80 on the VPS
restart: always # restart if failed, until we stop it ourselves
links:
- mongo
#external_links:
#- mongo
depends_on:
- mongo
- ipfs
networks:
- spk-cdn-node-network
environment:
MONGO_HOST: mongo:27017
IPFS_HOST: ipfs:5001
volumes:
- ./data/creds-live:/home/github/spk-indexer-node/data/creds-live
- ./data/nginx-live:/home/github/spk-indexer-node/data/nginx-live
mongo:
container_name: mongo2
image: mongo:latest
ports:
- 27027:27017
networks:
- spk-cdn-node-network
ipfs:
container_name: ipfs2
image: ipfs/go-ipfs:latest
command:
- daemon
- --enable-pubsub-experiment
# networks:
# - spk-cdn-node-network
network_mode: host
minio:
image: quay.io/minio/minio:latest
container_name: minio
ports:
- '9000:9000' # API port
- '9001:9001' # Console port
volumes:
- ${HOME}/minio # Adjust path if needed
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
command: server /data --console-address ":9001"
nginx:
container_name: nginx
image: nginx:1.15-alpine
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
ports:
- '80:80'
- '443:443'
volumes:
- ./data/nginx-live:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
networks:
- spk-cdn-node-network
depends_on:
- ipfs
- spk-cdn-node
certbot:
image: certbot/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
networks:
spk-cdn-node-network:
driver: bridge