-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yml
130 lines (128 loc) · 3.28 KB
/
deploy.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
version: '3.2'
services:
edr-lb:
image: 'vanuan/nginx-reloaded:latest'
volumes:
- /nfs/edr/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- /nfs/edr/ssl/acme/:/acme/
- /nfs/edr/ssl/dhparam.pem:/ssl/dhparam.pem
- /nfs/edr/letsencrypt/:/ssl/letsencrypt/
expose: ["80", "443"]
ports:
- target: 80
published: 80
protocol: tcp
mode: host
- target: 443
published: 443
protocol: tcp
mode: host
deploy:
placement:
constraints:
- node.hostname == do-edr3
edr-api:
image: 'vanuan/edrpou-api:latest'
command: sh -c '/wait-for-it.sh -t 100 edr-db:5432 && sails lift'
environment:
NODE_ENV: production
PORT: 80
PG: edr-db
depends_on:
- edr-db
- redis
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 512M
edr-api-docs:
image: 'vanuan/swagger-ui'
edr-db:
image: kiasaki/alpine-postgres:9.5
environment:
PGDATA: /var/lib/postgresql/data
volumes:
- /nfs/edr/postgres:/var/lib/postgresql/data
redis:
image: 'redis:3.2.3-alpine'
command: redis-server --appendonly yes
volumes:
- /nfs/edr/redis:/data
edr-static:
image: 'vanuan/edrpou-static'
environment:
GRAPHQL_URL: "http://edr-graphql/"
ELASTIC_URL: "http://elasticsearch:9200/companies_index/"
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 512M
edr-graphql:
image: 'vanuan/edrpou-graphql'
environment:
API_URL: 'http://edr-api/api'
ELASTIC_URL: "http://elasticsearch:9200/companies_index/"
deploy:
resources:
limits:
memory: 512M
reservations:
memory: 512M
elasticsearch:
image: 'portefaix/elasticsearch:2.3.0'
deploy:
resources:
limits:
memory: 1G
reservations:
memory: 1G
environment:
ES_HEAP_SIZE: '500m'
volumes:
- /nfs/edr/elasticsearch:/usr/share/elasticsearch/data
renew:
image: 'certbot/certbot'
volumes:
- /nfs/edr/ssl/acme/:/acme/.well-known/acme-challenge/
- /nfs/edr/letsencrypt:/etc/letsencrypt
command: 'certonly --webroot -w /acme/ -n -d edr.data-gov-ua.org'
deploy:
restart_policy:
condition: any
delay: 24h
# kibana:
# image: 'mklimuk/alpine-kibana'
# ports:
# - 5601:5601
# depends_on:
# - elasticsearch
# edr-uploader-elastic:
# image: 'vanuan/edrpou-uploader:latest'
# depends_on:
# - edr-db
# - elasticsearch
# environment:
# PG_CONNECTION_STRING: postgres://postgres@edr-db/postgres
# ELASTIC_HOST: elasticsearch:9200
# command: sh -c '/wait-for-it.sh -t 100 elasticsearch:9200 && node /src/pgToElastic.js'
# edr-uploader:
# build: ../edr-uploader
# volumes:
# - ./data:/data/edr/
# depends_on:
# - edr-db
# - edr-migrations
# environment:
# PG_CONNECTION_STRING: postgres://postgres@edr-db/postgres
#
# edr-migrations:
# build: ../edr-migrations
# command: sh -c '/wait-for-it.sh -t 100 edr-db:5432 && npm install && knex migrate:latest'
# depends_on:
# - edr-db
# environment:
# PG_CONNECTION_STRING: postgres://postgres@edr-db/postgres