File tree Expand file tree Collapse file tree 5 files changed +26
-5
lines changed
Expand file tree Collapse file tree 5 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ MONKEYTYPE_FRONTENDURL=http://myserver:8080
44# url of the backend server, this must be accessible by your clients browser
55MONKEYTYPE_BACKENDURL = http://myserver:5005
66
7- # below config is only needed, if you need user accounts
7+ # uncomment below config if you need user accounts
88# firebase config
99# FIREBASE_APIKEY=
1010# FIREBASE_AUTHDOMAIN=
@@ -13,7 +13,11 @@ MONKEYTYPE_BACKENDURL=http://myserver:5005
1313# FIREBASE_MESSAGINGSENDERID=
1414# FIREBASE_APPID=
1515
16- # google recapture
16+ # google recaptcha
17+ # uncomment below config if you need user accounts
18+ # you can use these defaults if you host this privately
19+ # RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
20+ # RECAPTCHA_SECRET=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
1721RECAPTCHA_SITE_KEY =
1822RECAPTCHA_SECRET =
1923
@@ -29,4 +33,4 @@ RECAPTCHA_SECRET=
2933# REDIS_PORT=6379
3034
3135# port of the mongodb server, not exposed by default
32- # MONGO_PORT:27017
36+ # MONGO_PORT:27017
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ RUN npm i -g pnpm && \
2121FROM nginx:mainline-alpine
2222
2323COPY --from=builder /app/frontend/dist /usr/share/nginx/html
24+ COPY docker/frontend/nginx.conf /etc/nginx/conf.d/default.conf
2425COPY docker/frontend/updateConfig.sh /docker-entrypoint.d/updateConfig.sh
2526RUN chmod +x /docker-entrypoint.d/updateConfig.sh
2627
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80 ;
3+ listen [::]:80 ;
4+
5+ server_name frontend;
6+ location / {
7+ root /usr/share/nginx/html;
8+ try_files $uri $uri / /index .html;
9+ }
10+
11+ }
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd /usr/share/nginx/html
3- echo " repace firebase config"
3+ echo " replace firebase config appid: ${FIREBASE_APPID} "
44sed -i " s/###FIREBASE_APIKEY###/${FIREBASE_APIKEY} /g" js/firebase.* .js
55sed -i " s/###FIREBASE_AUTHDOMAIN###/${FIREBASE_AUTHDOMAIN} /g" js/firebase.* .js
66sed -i " s/###FIREBASE_PROJECTID###/${FIREBASE_PROJECTID} /g" js/firebase.* .js
@@ -12,5 +12,5 @@ sed -i "s/###FIREBASE_APPID###/${FIREBASE_APPID}/g" js/firebase.*.js
1212echo " use backend url ${MONKEYTYPE_BACKENDURL} "
1313sed -i " s/###MONKEYTYPE_BACKENDURL###/${MONKEYTYPE_BACKENDURL// \/ / \\ / } /g" js/* .js
1414
15- echo " use recapture ${RECAPTCHA_SITE_KEY} "
15+ echo " use recaptcha ${RECAPTCHA_SITE_KEY} "
1616sed -i " s/###RECAPTCHA_SITE_KEY###/${RECAPTCHA_SITE_KEY// \/ / \\ / } /g" js/* .js
Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ Stop the running docker containers using `docker compose down` before making any
120120 RECAPTCHA_SECRET="your secret key"
121121 ` ` `
122122
123+ If you host privately you can use these defaults :
124+ ` ` `
125+ RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
126+ RECAPTCHA_SECRET=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
127+ ` ` `
123128
124129# # Enable daily leaderboards
125130
You can’t perform that action at this time.
0 commit comments