-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
108 lines (105 loc) · 3.56 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
version: '3.7'
x-shared-api-variables: &shared-api-variables
NODE_ENV: development
ENV_PREFIX: ONIFY_
INTERPRET_CHAR_AS_DOT: _
ONIFY_logging_log: stdout # stdout,elastic
#ONIFY_db_alwaysRefresh: "true" # For testing purposes
ONIFY_db_elasticsearch_host: http://linked-elasticsearch:9200
ONIFY_db_indexPrefix: dev # use "onify" for prod
ONIFY_client_secret: ${API_CLIENT_SECRET}
ONIFY_client_code: ${API_CLIENT_CODE} # Contact Onify at [email protected] for this
ONIFY_client_instance: ${API_CLIENT_INSTANCE} # Contact Onify at [email protected] for this
ONIFY_initialLicense: ${LICENSE} # Contact Onify at [email protected] for license
ONIFY_adminUser_username: admin
ONIFY_adminUser_password: ${ADMIN_PASSWORD}
ONIFY_adminUser_email: [email protected]
ONIFY_apiTokens_app_secret: ${API_APP_SECRET}
ONIFY_logging_logLevel: debug # use "info" for prod
ONIFY_resources_baseDir: ./data/resources
ONIFY_resources_tempDir: ./data/storage
ONIFY_websockets_agent_url: ws://linked-agent-server:8080/hub
x-shared-api-volumes: &shared-api-volumes # make sure the paths exist
- ./tmp/resources:/usr/app/data
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.16.1
ports:
- 9200:9200
environment:
- ES_JAVA_OPTS=-Xms1g -Xmx1g # can be increased but make sure it doesn't exceed docker limits
- discovery.type=single-node
- cluster.name=onify
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5m
retries: 30
volumes:
- ./tmp/elasticsearch:/usr/share/elasticsearch/data
agent-server:
image: eu.gcr.io/onify-images/hub/agent-server:latest # IMPORTANT: replace with desired version
environment:
hub_version: v2
log_level: "2"
log_type: "2"
ports:
- 8080:8080
api:
image: eu.gcr.io/onify-images/hub/api:latest # IMPORTANT: replace with desired version
restart: always
depends_on:
- elasticsearch
environment:
<<: *shared-api-variables
ONIFY_autoinstall: "true"
ports:
- 8181:8181
links:
- elasticsearch:linked-elasticsearch
- agent-server:linked-agent-server
volumes: *shared-api-volumes
worker:
image: eu.gcr.io/onify-images/hub/api:latest # IMPORTANT: replace with desired version
command: worker
restart: always
depends_on:
- elasticsearch
environment:
<<: *shared-api-variables
ONIFY_worker_cleanupInterval: "30"
links:
- elasticsearch:linked-elasticsearch
- agent-server:linked-agent-server
volumes: *shared-api-volumes
app:
image: eu.gcr.io/onify-images/hub/app:latest # IMPORTANT: replace with desired version
restart: always
depends_on:
- api
environment:
NODE_ENV: development
ENV_PREFIX: ONIFY_
INTERPRET_CHAR_AS_DOT: _
ONIFY_api_admintoken: ${APP_API_TOKEN}
ONIFY_api_internalUrl: http://linked-api:8181/api/v2
ONIFY_api_externalUrl: /api/v2
ONIFY_disableAdminEndpoints: "false"
links:
- api:linked-api
ports:
- 3000:3000
functions: # optional
image: eu.gcr.io/onify-images/hub/functions:latest
pull_policy: always
restart: always
ports:
- 8282:8282
# --- IF YOU WANT TO USE ONIFY HELIX, UNCOMMENT THESE LINES ---
# helix:
# image: ghcr.io/onify/helix-app:latest # IMPORTANT: replace with your custom Helix image
# pull_policy: always
# restart: always
# ports:
# - 4000:4000
# --- IF YOU WANT TO USE ONIFY HELIX, UNCOMMENT THESE LINES ---