Skip to content

Commit

Permalink
Merge branch 'refs/heads/upstream' into feat_fill_country
Browse files Browse the repository at this point in the history
# Conflicts:
#	pnpm-lock.yaml
  • Loading branch information
ben-29 committed Apr 14, 2024
2 parents ddcd51e + 7901120 commit 4a156df
Show file tree
Hide file tree
Showing 8 changed files with 4,080 additions and 47 deletions.
13 changes: 10 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
FROM python:3.10.5-slim AS develop-py
WORKDIR /root/running_page
COPY ./requirements.txt /root/running_page/requirements.txt
# Add proxy for apt.
# ENV http_proxy http://ip_address:port
# ENV https_proxy http://ip_address:port
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& apt-get purge -y --auto-remove \
Expand All @@ -14,10 +17,10 @@ FROM node:18 AS develop-node
WORKDIR /root/running_page
COPY ./package.json /root/running_page/package.json
COPY ./pnpm-lock.yaml /root/running_page/pnpm-lock.yaml
RUN npm config set registry https://registry.npm.taobao.org \
RUN npm config rm proxy&&npm config set registry https://registry.npmjs.org/ \
&&npm install -g corepack \
&&corepack enable \
&&pnpm install
&&yarn install

FROM develop-py AS data
ARG app
Expand All @@ -27,6 +30,8 @@ ARG client_id
ARG client_secret
ARG refresh_token
ARG YOUR_NAME
ARG keep_phone_number
ARG keep_password

WORKDIR /root/running_page
COPY . /root/running_page/
Expand All @@ -43,6 +48,8 @@ RUN DUMMY=${DUMMY}; \
python3 run_page/strava_sync.py ${client_id} ${client_secret} ${refresh_token};\
elif [ "$app" = "Nike_to_Strava" ] ; then \
python3 run_page/nike_to_strava_sync.py ${nike_refresh_token} ${client_id} ${client_secret} ${refresh_token};\
elif [ "$app" = "Keep" ] ; then \
python3 run_page/keep_sync.py ${keep_phone_number} ${keep_password};\
else \
echo "Unknown app" ; \
fi
Expand All @@ -54,7 +61,7 @@ RUN python3 run_page/gen_svg.py --from-db --title "my running page" --type grid
FROM develop-node AS frontend-build
WORKDIR /root/running_page
COPY --from=data /root/running_page /root/running_page
RUN pnpm run build
RUN yarn run build

FROM nginx:alpine AS web
COPY --from=frontend-build /root/running_page/dist /usr/share/nginx/html/
Expand Down
9 changes: 7 additions & 2 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
| [zhubao315](https://github.com/zhubao315) | <https://zhubao315.github.io/running> | Strava |
| [shaonianche](https://github.com/shaonianche) | <https://run.duanfei.org> | Strava |
| [yihong0618](https://github.com/yihong0618) | <https://yihong.run> | Nike |
| [superleeyom](https://github.com/superleeyom) | <https://running.leeyom.top> | Nike |
| [superleeyom](https://github.com/superleeyom) | <https://running.leeyom.top> | Strava |
| [geekplux](https://github.com/geekplux) | <https://activities.geekplux.com> | Nike |
| [guanlan](https://github.com/guanlan) | <https://grun.vercel.app> | Strava |
| [tuzimoe](https://github.com/tuzimoe) | <https://run.tuzi.moe> | Nike |
Expand Down Expand Up @@ -99,6 +99,8 @@ R.I.P. 希望大家都能健康顺利的跑过终点,逝者安息。
| [PPZ](https://github.com/8824PPZ) | <https://run.dudubbbbbbbbb.top/> | Strava |
| [Yer1k](https://github.com/Yer1k) | <https://running.yer1k.com/> | Strava |
| [AlienVision](https://github.com/weaming) | <https://run.drink.cafe/> | Strava |
| [Vensent](https://github.com/Vensent) | <https://vensent.github.io/workouts_page/> | Garmin |
| [Zeonsing](https://github.com/NoonieBao) | <https://run.jogzeal.com/> | Coros |
</details>

## 它是怎么工作的
Expand Down Expand Up @@ -185,6 +187,9 @@ docker build -t running_page:latest . --build-arg app=Strava --build-arg client_
#Nike_to_Strava
docker build -t running_page:latest . --build-arg app=Nike_to_Strava --build-arg nike_refresh_token="" --build-arg client_id="" --build-arg client_secret="" --build-arg refresh_token=""

# Keep
docker build -t running_page:latest . --build-arg app=Keep --build-arg keep_phone_number="" --build-arg keep_password=""

#启动
docker run -itd -p 80:80 running_page:latest

Expand Down Expand Up @@ -1128,7 +1133,7 @@ curl https://api.github.com/repos/yihong0618/running_page/actions/workflows -H "

- vercel git

如果想 ignpre gh-pages 可以在 `settings` -> `build` -> `Ignored Build Step` -> `Custom` 输入命令:
如果想 ignore gh-pages 可以在 `settings` -> `build` -> `Ignored Build Step` -> `Custom` 输入命令:

```bash
if [ "$VERCEL_GIT_COMMIT_REF" != "gh-pages" ]; then exit 1; else exit 0;
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ English | [简体中文](https://github.com/yihong0618/running_page/blob/master/
| [zhubao315](https://github.com/zhubao315) | <https://zhubao315.github.io/running> | Strava |
| [shaonianche](https://github.com/shaonianche) | <https://run.duanfei.org> | Strava |
| [yihong0618](https://github.com/yihong0618) | <https://yihong.run> | Nike |
| [superleeyom](https://github.com/superleeyom) | <https://running.leeyom.top> | Nike |
| [superleeyom](https://github.com/superleeyom) | <https://running.leeyom.top> | Strava |
| [geekplux](https://github.com/geekplux) | <https://activities.geekplux.com> | Nike |
| [guanlan](https://github.com/guanlan) | <https://grun.vercel.app> | Strava |
| [tuzimoe](https://github.com/tuzimoe) | <https://run.tuzi.moe> | Nike |
Expand Down Expand Up @@ -96,6 +96,9 @@ English | [简体中文](https://github.com/yihong0618/running_page/blob/master/
| [PPZ](https://github.com/8824PPZ) | <https://run.dudubbbbbbbbb.top/> | Strava |
| [Yer1k](https://github.com/Yer1k) | <https://running.yer1k.com/> | Strava |
| [AlienVision](https://github.com/weaming) | <https://run.drink.cafe/> | Strava |
| [闻笑忘](https://wenxiaowan.com) | <https://wenxiaowan.com> | 苹果健身 |
| [Vensent](https://github.com/Vensent) | <https://vensent.github.io/workouts_page/> | Garmin |
| [Zeonsing](https://github.com/NoonieBao) | <https://run.jogzeal.com/> | Coros |
</details>

## How it works
Expand Down Expand Up @@ -167,6 +170,9 @@ docker build -t running_page:latest . --build-arg app=Strava --build-arg client_
# Nike_to_Strava
docker build -t running_page:latest . --build-arg app=Nike_to_Strava --build-arg nike_refresh_token="" --build-arg client_id="" --build-arg client_secret="" --build-arg refresh_token=""

# Keep
docker build -t running_page:latest . --build-arg app=Keep --build-arg keep_phone_number="" --build-arg keep_password=""

# run
docker run -itd -p 80:80 running_page:latest

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"sass": "^1.52.3",
"sass-mq": "^6.0.0",
"tachyons": "^4.12.0",
"tachyons-sass": "git+https://github.com/tachyons-css/tachyons-sass.git",
"tachyons-sass-fork": "4.9.5",
"viewport-mercator-project": "^7.0.4",
"vite": "^4.3.9",
"vite-plugin-svgr": "^3.2.0",
Expand Down Expand Up @@ -65,6 +65,5 @@
"eslint-plugin-react": "^7.32.2",
"prettier": "2.8.8",
"typescript": "^5.1.6"
},
"packageManager": "yarn@1.22.22"
}
}
Loading

0 comments on commit 4a156df

Please sign in to comment.