forked from AppFlowy-IO/AppFlowy-Cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
119 lines (112 loc) · 3.93 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
109
110
111
112
113
114
115
116
117
118
119
version: '3'
services:
nginx:
image: nginx
ports:
- 80:80
- 443:443
depends_on:
- appflowy_cloud
- gotrue
- admin_frontend
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl/certificate.crt:/etc/nginx/ssl/certificate.crt
- ./nginx/ssl/private_key.key:/etc/nginx/ssl/private_key.key
minio:
image: minio/minio
ports:
- 9000:9000
- 9001:9001
command: server /data --console-address ":9001"
postgres:
build:
context: .
dockerfile: docker/postgres.Dockerfile
environment:
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_DB=${POSTGRES_DB:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-password}
- POSTGRES_HOST=${POSTGRES_HOST:-postgres}
ports:
- 5433:5432
volumes:
- ./migrations/before:/docker-entrypoint-initdb.d
pgadmin:
image: dpage/pgadmin4
depends_on:
- postgres
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
ports:
- 5400:80
volumes:
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
redis:
image: redis
ports:
- 6380:6379
gotrue:
build:
context: .
dockerfile: docker/gotrue.Dockerfile
restart: on-failure
depends_on:
- postgres
environment:
- GOTRUE_SITE_URL= # redirected to AppFlowy application
- URI_ALLOW_LIST=* # adjust restrict if necessary
- GOTRUE_JWT_SECRET=${GOTRUE_JWT_SECRET} # authentication secret
- GOTRUE_DB_DRIVER=postgres
- API_EXTERNAL_URL=${API_EXTERNAL_URL}
- DATABASE_URL=postgres://supabase_auth_admin:root@postgres:5432/postgres
- PORT=9999
- GOTRUE_SMTP_HOST=${GOTRUE_SMTP_HOST} # e.g. smtp.gmail.com
- GOTRUE_SMTP_PORT=${GOTRUE_SMTP_PORT} # e.g. 465
- GOTRUE_SMTP_USER=${GOTRUE_SMTP_USER} # email sender, e.g. noreply@appflowy.io
- GOTRUE_SMTP_PASS=${GOTRUE_SMTP_PASS} # email password
- GOTRUE_SMTP_ADMIN_EMAIL=${GOTRUE_SMTP_ADMIN_EMAIL} # email with admin privileges e.g. internal@appflowy.io
- GOTRUE_SMTP_MAX_FREQUENCY=${GOTRUE_SMTP_MAX_FREQUENCY:-1ns} # set to 1ns for running tests
- GOTRUE_MAILER_URLPATHS_CONFIRMATION=/verify
- GOTRUE_MAILER_AUTOCONFIRM=${GOTRUE_MAILER_AUTOCONFIRM:-false} # change this to true to skip email confirmation
- GOTRUE_EXTERNAL_GOOGLE_ENABLED=${GOTRUE_EXTERNAL_GOOGLE_ENABLED}
- GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=${GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID}
- GOTRUE_EXTERNAL_GOOGLE_SECRET=${GOTRUE_EXTERNAL_GOOGLE_SECRET}
- GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=${GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI}
ports:
- 9998:9999
appflowy_cloud:
restart: on-failure
environment:
- RUST_LOG=${RUST_LOG:-info}
- APP_ENVIRONMENT=production
- APP__GOTRUE__JWT_SECRET=${GOTRUE_JWT_SECRET}
- APP__GOTRUE__EXT_URL=${API_EXTERNAL_URL}
- APP__GOTRUE__ADMIN_EMAIL=${GOTRUE_ADMIN_EMAIL}
- APP__GOTRUE__ADMIN_PASSWORD=${GOTRUE_ADMIN_PASSWORD}
- APP__S3__USE_MINIO=${USE_MINIO}
- APP__S3__MINIO_URL=${MINIO_URL:-http://minio:9000}
- APP__S3__AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- APP__S3__AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- APP__S3__AWS_S3_BUCKET=${AWS_S3_BUCKET}
- APP__S3__AWS_REGION=${AWS_REGION}
build:
context: .
dockerfile: Dockerfile
image: appflowy_cloud:${BACKEND_VERSION:-latest}
depends_on:
- redis
- postgres
- gotrue
ports:
- 8000:8000
admin_frontend:
restart: on-failure
build:
context: .
dockerfile: ./admin_frontend/Dockerfile
depends_on:
- gotrue
ports:
- 3000:3000