forked from clearflask/clearflask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.self-host.yml
87 lines (87 loc) · 2.33 KB
/
docker-compose.self-host.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
## SPDX-FileCopyrightText: 2019-2022 Matus Faro <[email protected]>
## SPDX-License-Identifier: Apache-2.0
version: '3.8'
volumes:
data:
driver: local
services:
clearflask-connect:
image: ghcr.io/clearflask/clearflask-connect:latest
depends_on:
- clearflask-server
ports:
- 80:9080
- 443:9443
environment:
- NODE_ENV=production
- ENV=selfhost
- CLEARFLASK_CREATE_CONNECT_CONFIG_IF_MISSING=1
volumes:
- ./connect:/opt/clearflask/
clearflask-server:
image: ghcr.io/clearflask/clearflask-server:latest
ports:
- 8080:8080
# JMX
- 9950:9950
- 9951:9951
environment:
- CLEARFLASK_ENVIRONMENT=PRODUCTION_SELF_HOST
- CLEARFLASK_CREATE_SERVER_CONFIG_IF_MISSING=1
volumes:
- ./server:/opt/clearflask/
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/api/health" ]
interval: 5s
timeout: 15s
retries: 2
# MySQL (enabled by default as an alternative to ElasticSearch)
mysql-db:
image: mysql:5.7@sha256:2c23f254c6b9444ecda9ba36051a9800e8934a2f5828ecc8730531db8142af83
platform: linux/amd64
command:
- 'mysqld'
- '--port=3306'
- '--sql-mode=IGNORE_SPACE'
- '--explicit-defaults-for-timestamp'
- '--secure-file-priv=/tmp'
volumes:
- ./data/mysql:/var/lib/mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=clearflask
# ElasticSearch (disabled by default)
# elasticsearch:
# profiles:
# - with-deps
# image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0
# expose:
# - 9200
# environment:
# - ES_JAVA_OPTS=-Xms2g -Xmx2g
# - discovery.type=single-node
# mem_limit: 4g
# volumes:
# - ./data/elasticsearch:/usr/share/elasticsearch/data
# For DynamoDB, S3 and SES alternative
localstack:
profiles:
- with-deps
image: localstack/localstack:0.14.3
expose:
- 4566
- 4571
environment:
- DEFAULT_REGION=us-east-1
- LOCALSTACK_HOSTNAME=localstack
- HOSTNAME_EXTERNAL=localstack
- SERVICES=dynamodb,ses,s3
- LS_LOG=warn
- START_WEB=0
- USE_SSL=0
- FORCE_NONINTERACTIVE=true
- DATA_DIR=/tmp/localstack/data
- LEGACY_PERSISTENCE=1
volumes:
- ./data/localstack:/tmp/localstack