-
Notifications
You must be signed in to change notification settings - Fork 87
/
docker-compose.yml
127 lines (122 loc) · 3.95 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
120
121
122
123
124
125
126
127
# This docker-compose file is only for local development purposes.
version: '3'
services:
formsg:
build:
context: .
dockerfile: Dockerfile.development
depends_on:
- database
volumes:
- ./:/opt/formsg
- /opt/formsg/node_modules
ports:
- '5000:5000'
- '4566:4566' # localstack ports
- '5156:5156' # mockpass ports
- '9229:9229' # Node debugger port
environment:
- NODE_ENV=development
- DB_HOST=mongodb://database:27017/formsg
- APP_NAME=FormSG
- APP_URL=http://localhost:5000
- ATTACHMENT_S3_BUCKET=local-attachment-bucket
- IMAGE_S3_BUCKET=local-image-bucket
- LOGO_S3_BUCKET=local-logo-bucket
- FORMSG_SDK_MODE=development
- BOUNCE_LIFE_SPAN=86400000
- AWS_ACCESS_KEY_ID=fakeKey
- AWS_SECRET_ACCESS_KEY=fakeSecret
- SESSION_SECRET=thisisasecret
- AWS_ENDPOINT=http://localhost:4566
- SUBMISSIONS_RATE_LIMIT=200
- SEND_AUTH_OTP_RATE_LIMIT=60
- SES_PORT=25
- SES_HOST=maildev
- MYINFO_CLIENT_CONFIG=dev
- MYINFO_FORMSG_KEY_PATH=./node_modules/@opengovsg/mockpass/static/certs/key.pem
- MYINFO_CERT_PATH=./node_modules/@opengovsg/mockpass/static/certs/spcp.crt
- MYINFO_CLIENT_ID=mockClientId
- MYINFO_CLIENT_SECRET=mockClientSecret
- GA_TRACKING_ID
- SENTRY_CONFIG_URL
- TWILIO_ACCOUNT_SID
- TWILIO_API_KEY
- TWILIO_API_SECRET
- TWILIO_MESSAGING_SERVICE_SID
- SES_PASS
- SES_USER
- OTP_LIFE_SPAN
- AWS_REGION
- GOOGLE_CAPTCHA
- GOOGLE_CAPTCHA_PUBLIC
- SIGNING_SECRET_KEY
- VERIFICATION_SECRET_KEY
- SP_FORMSG_KEY_PATH
- SP_FORMSG_CERT_PATH
- SP_IDP_CERT_PATH
- SINGPASS_IDP_LOGIN_URL
- SINGPASS_IDP_ENDPOINT
- SINGPASS_ESRVC_ID
- SINGPASS_PARTNER_ENTITY_ID
- SINGPASS_IDP_ID
- CP_FORMSG_KEY_PATH
- CP_FORMSG_CERT_PATH
- CP_IDP_CERT_PATH
- CORPPASS_IDP_LOGIN_URL
- CORPPASS_IDP_ENDPOINT
- CORPPASS_PARTNER_ENTITY_ID
- CORPPASS_ESRVC_ID
- CORPPASS_IDP_ID
- IS_SP_MAINTENANCE
- IS_CP_MAINTENANCE
- AGGREGATE_COLLECTION
mockpass:
build: https://github.com/opengovsg/mockpass.git
depends_on:
- formsg
environment:
- CORPPASS_ASSERT_ENDPOINT=http://localhost:5000/corppass/login
- SINGPASS_ASSERT_ENDPOINT=http://localhost:5000/singpass/login
- MOCKPASS_NRIC=S6005038D
- MOCKPASS_UEN=123456789A
- SHOW_LOGIN_PAGE=true
- SINGPASS_IDP_ID=https://saml-internet.singpass.gov.sg/FIM/sps/SingpassIDPFed/saml20
- CORPPASS_IDP_ID=https://saml.corppass.gov.sg/FIM/sps/CorpIDPFed/saml20
network_mode: 'service:formsg' # reuse formsg service's network stack so that it can resolve localhost:5156 to mockpass:5156
database:
image: 'mongo:4.0'
container_name: 'formsg-db'
environment:
- MONGO_INITDB_DATABASE=formsg
volumes:
- mongodata:/data/db
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
ports:
- '27017:27017'
logging:
driver: none
localstack:
image: localstack/localstack:0.11.5
container_name: formsg-localstack
depends_on:
- formsg
environment:
- SERVICES=s3
- DATA_DIR=/tmp/localstack/data
- ATTACHMENT_S3_BUCKET=local-attachment-bucket
- IMAGE_S3_BUCKET=local-image-bucket
- LOGO_S3_BUCKET=local-logo-bucket
volumes:
- './.localstack:/tmp/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
# This is where we add scripts to initialise AWS resources.
# Docs: https://github.com/localstack/localstack#initializing-a-fresh-instance
- './docker-entrypoint-initaws.d:/docker-entrypoint-initaws.d'
network_mode: 'service:formsg' # reuse formsg service's network stack so that it can resolve localhost:4566 to localstack:4566
maildev:
image: maildev/maildev
ports:
- '1080:80'
volumes:
mongodata: