-
Notifications
You must be signed in to change notification settings - Fork 37
/
docker-compose.yml
116 lines (112 loc) · 3.82 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
version: '3'
services:
app:
build:
context: .
dockerfile: Dockerfile.dev
command: npm run docker-dev
depends_on:
- postgres
- redis
- localstack
ports:
- '3000:3000' # Webpack dev server
- '8080:8080' # Express
- '9229:9229' # Debugging for Node.js
environment:
- NODE_ENV=development
- PORT=8080
# postgres://user:pass@hostname:port/database
- DB_URI=postgres://postgres:postgres@postgres:5432/postgres
- REPLICA_URI=postgres://postgres:postgres@postgres:5432/postgres
# redis://[CLUSTER-PUBLIC-IP]:[PORT]
- REDIS_OTP_URI=redis://redis:6379/0
- REDIS_SESSION_URI=redis://redis:6379/1
- REDIS_REDIRECT_URI=redis://redis:6379/2
- REDIS_STAT_URI=redis://redis:6379/3
- REDIS_SAFE_BROWSING_URI=redis://redis:6379/4
- SESSION_SECRET=thiscouldbeanything
- GA_TRACKING_ID=UA-139330318-1
- SGID_API_HOSTNAME=https://api.id.gov.sg
- OG_URL=https://go.gov.sg
- VALID_EMAIL_GLOB_EXPRESSION=*.gov.sg
- COOKIE_MAX_AGE=86400000
- LOGIN_MESSAGE=Your OTP might take awhile to get to you.
- USER_MESSAGE=User message test
- ANNOUNCEMENT_MESSAGE=Search by email to find link owners, or by keyword to discover other links! \n PRO TIP! Search your email domain to find out all the links made by your agency.
- ANNOUNCEMENT_TITLE=GoDirectory is here!
- ANNOUNCEMENT_SUBTITLE=Search all go.gov.sg links
- ANNOUNCEMENT_URL=https://go.gov.sg/
- ANNOUNCEMENT_IMAGE=/assets/gov/transition-page/images/directory-browser.svg
- ANNOUNCEMENT_BUTTON_TEXT=Try me now
- AWS_S3_BUCKET=local-bucket
- ROTATED_LINKS=whatsapp,passport,spsc,sppr
- AWS_ACCESS_KEY_ID=foobar
- AWS_SECRET_ACCESS_KEY=foobar
- CSP_ONLY_REPORT_VIOLATIONS=true
- SAFE_BROWSING_KEY
- CLOUDMERSIVE_KEY
- ASSET_VARIANT=gov
- SES_HOST=maildev
- SES_PORT=25
- POSTMAN_API_KEY
- POSTMAN_API_URL
- ACTIVATE_POSTMAN_FALLBACK
- BULK_UPLOAD_MAX_NUM=1000
- BULK_UPLOAD_RANDOM_STR_LENGTH=8
- SQS_BULK_QRCODE_GENERATE_START_URL
- SQS_TIMEOUT=10000
- SQS_REGION
- BULK_QR_CODE_BATCH_SIZE=1000
- ACTIVATE_BULK_QR_CODE_GENERATION=false
- JOB_POLL_ATTEMPTS=12
- JOB_POLL_INTERVAL=5000
- BULK_QR_CODE_BUCKET_URL
- API_LINK_RANDOM_STR_LENGTH=8
- API_KEY_SALT=$$2b$$10$$9rBKuE4Gb5ravnvP4xjoPu
- FF_EXTERNAL_API=true
volumes:
- ./public:/usr/src/gogovsg/public
- ./src:/usr/src/gogovsg/src
- ./.logs:/root/.npm/_logs
postgres:
image: postgres:11.1-alpine
environment:
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432' # Postgres
volumes:
- pgdata:/var/lib/postgresql/data
redis:
image: redis:5.0.3-alpine
ports:
- '6379:6379'
localstack:
image: localstack/localstack:1.2
container_name: gogovsg-localstack
ports:
- '4566:4566'
- '8055:8080' # View deployed resources @ http://localhost:8055/#!/infra.
environment:
- SERVICES=s3 # AWS services to emulate.
- DEBUG=1 # Display relevant logs.
- DATA_DIR=/tmp/localstack/data # Directory Localstack saves data internally.
- HOSTNAME_EXTERNAL=localstack
- AWS_BUCKET_NAME=local-bucket
- AWS_ACCESS_KEY_ID=foobar
- AWS_SECRET_ACCESS_KEY=foobar
volumes:
- ./init-localstack.sh:/docker-entrypoint-initaws.d/init-localstack.sh # Initialise the bucket.
- './.localstack:/tmp/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
maildev:
image: maildev/maildev
build:
context: .
dockerfile: Dockerfile.maildev-logging
command: bin/maildev --web 80 --smtp 25 --verbose
ports:
- "1080:80"
volumes:
pgdata: