-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
131 lines (119 loc) · 2.85 KB
/
docker-compose.prod.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
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
services:
postgres:
container_name: arkivo_db
restart: unless-stopped
image: postgres:13
volumes:
- db_volume:/var/lib/postgresql/data
- ./dockerConfig/postgres-dev-init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
POSTGRES_USER: ${PG_USER}
POSTGRES_PASSWORD: ${PG_PASSWORD}
ports:
- 5439:5432
redis:
container_name: arkivo_redis
restart: unless-stopped
image: redis:6-alpine
volumes:
- redis_volume:/data
ports:
- 6378:6379
ipfs:
container_name: arkivo_ipfs
restart: unless-stopped
image: ipfs/kubo
volumes:
- ipfs_path:/data/ipfs
- ipfs_fuse:/ipfs
- ipns_fuse:/ipns
environment:
- IPFS_PATH=/data/ipfs
ports:
# Swarm listens on all interfaces, so is remotely reachable.
- 4001:4001/tcp
- 4001:4001/udp
# The following ports only listen on the loopback interface, so are not remotely reachable by default.
# If you want to override these or add more ports, see https://docs.docker.com/compose/extends/ .
# API port, which includes admin operations, so you probably don't want this remotely accessible.
- 5001:5001
# HTTP Gateway
- 8081:8080
app:
container_name: arkivo_app
restart: unless-stopped
depends_on:
- postgres
- redis
- ipfs
build:
context: .
dockerfile: ./docker/app/Dockerfile
ports:
- ${PORT}:${PORT}
- 9229:9229
- 8080:8080
env_file:
- .env
environment:
- PG_HOST=postgres
- REDIS_HOST=redis
volumes:
- ./:/home/node/app
worker-ipfs:
container_name: arkivo_worker_ipfs
restart: unless-stopped
depends_on:
- postgres
- redis
build:
context: .
dockerfile: ./docker/worker-ipfs/Dockerfile
env_file:
- .env
environment:
- PG_HOST=postgres
- REDIS_HOST=redis
volumes:
- ./:/home/node/app
worker-snapshot:
container_name: arkivo_worker_snapshot
restart: always
depends_on:
- postgres
- redis
build:
context: .
dockerfile: ./docker/worker-snapshot/Dockerfile
env_file:
- .env
environment:
- PG_HOST=postgres
- REDIS_HOST=redis
volumes:
- ./:/home/node/app
nginx:
container_name: arkivo_nginx
image: nginx:alpine
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./ssl:/etc/letsencrypt
- ./webroot:/var/www/html
depends_on:
- app
- ipfs
environment:
- NGINX_HOST=arkivo.art
- NGINX_PORT=80
- APP_PORT=${PORT}
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
volumes:
db_volume:
redis_volume:
ipfs_path:
ipfs_fuse:
ipns_fuse: