mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-17 11:06:17 +08:00
fix(docker): fix deeplinks and update documentation (@fehmer) (#6640)
- support deep links like `/login` - fix some typos closes #6628 --------- Co-authored-by: Jack <jack@monkeytype.com>
This commit is contained in:
parent
ebfa8bea61
commit
85543ffa19
5 changed files with 26 additions and 5 deletions
|
@ -4,7 +4,7 @@ MONKEYTYPE_FRONTENDURL=http://myserver:8080
|
|||
#url of the backend server, this must be accessible by your clients browser
|
||||
MONKEYTYPE_BACKENDURL=http://myserver:5005
|
||||
|
||||
# below config is only needed, if you need user accounts
|
||||
# uncomment below config if you need user accounts
|
||||
# firebase config
|
||||
#FIREBASE_APIKEY=
|
||||
#FIREBASE_AUTHDOMAIN=
|
||||
|
@ -13,7 +13,11 @@ MONKEYTYPE_BACKENDURL=http://myserver:5005
|
|||
#FIREBASE_MESSAGINGSENDERID=
|
||||
#FIREBASE_APPID=
|
||||
|
||||
# google recapture
|
||||
# google recaptcha
|
||||
# uncomment below config if you need user accounts
|
||||
# you can use these defaults if you host this privately
|
||||
#RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
|
||||
#RECAPTCHA_SECRET=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
||||
RECAPTCHA_SITE_KEY=
|
||||
RECAPTCHA_SECRET=
|
||||
|
||||
|
@ -29,4 +33,4 @@ RECAPTCHA_SECRET=
|
|||
# REDIS_PORT=6379
|
||||
|
||||
# port of the mongodb server, not exposed by default
|
||||
# MONGO_PORT:27017
|
||||
# MONGO_PORT:27017
|
||||
|
|
|
@ -21,6 +21,7 @@ RUN npm i -g pnpm && \
|
|||
FROM nginx:mainline-alpine
|
||||
|
||||
COPY --from=builder /app/frontend/dist /usr/share/nginx/html
|
||||
COPY docker/frontend/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY docker/frontend/updateConfig.sh /docker-entrypoint.d/updateConfig.sh
|
||||
RUN chmod +x /docker-entrypoint.d/updateConfig.sh
|
||||
|
||||
|
|
11
docker/frontend/nginx.conf
Normal file
11
docker/frontend/nginx.conf
Normal file
|
@ -0,0 +1,11 @@
|
|||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name frontend;
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
cd /usr/share/nginx/html
|
||||
echo "repace firebase config"
|
||||
echo "replace firebase config appid: ${FIREBASE_APPID}"
|
||||
sed -i "s/###FIREBASE_APIKEY###/${FIREBASE_APIKEY}/g" js/firebase.*.js
|
||||
sed -i "s/###FIREBASE_AUTHDOMAIN###/${FIREBASE_AUTHDOMAIN}/g" js/firebase.*.js
|
||||
sed -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
|
|||
echo "use backend url ${MONKEYTYPE_BACKENDURL}"
|
||||
sed -i "s/###MONKEYTYPE_BACKENDURL###/${MONKEYTYPE_BACKENDURL//\//\\/}/g" js/*.js
|
||||
|
||||
echo "use recapture ${RECAPTCHA_SITE_KEY}"
|
||||
echo "use recaptcha ${RECAPTCHA_SITE_KEY}"
|
||||
sed -i "s/###RECAPTCHA_SITE_KEY###/${RECAPTCHA_SITE_KEY//\//\\/}/g" js/*.js
|
||||
|
|
|
@ -120,6 +120,11 @@ Stop the running docker containers using `docker compose down` before making any
|
|||
RECAPTCHA_SECRET="your secret key"
|
||||
```
|
||||
|
||||
If you host privately you can use these defaults:
|
||||
```
|
||||
RECAPTCHA_SITE_KEY=6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
|
||||
RECAPTCHA_SECRET=6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
||||
```
|
||||
|
||||
## Enable daily leaderboards
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue