mirror of
https://github.com/Anduin2017/HowToCook.git
synced 2025-12-17 10:44:23 +08:00
Add docker support.
This commit is contained in:
1
.github/templates/readme_template.md
vendored
1
.github/templates/readme_template.md
vendored
@@ -5,6 +5,7 @@
|
|||||||
[](https://github.com/Anduin2017/HowToCook/graphs/contributors)
|
[](https://github.com/Anduin2017/HowToCook/graphs/contributors)
|
||||||
[](https://www.npmjs.com/package/how-to-cook)
|
[](https://www.npmjs.com/package/how-to-cook)
|
||||||

|

|
||||||
|
[](https://hub.aiursoft.cn/#!/taglist/anduin/howtocook)
|
||||||
|
|
||||||
最近在家隔离,出不了门。只能宅在家做饭了。作为程序员,我偶尔在网上找找菜谱和做法。但是这些菜谱往往写法千奇百怪,经常中间莫名出来一些材料。对于习惯了形式语言的程序员来说极其不友好。
|
最近在家隔离,出不了门。只能宅在家做饭了。作为程序员,我偶尔在网上找找菜谱和做法。但是这些菜谱往往写法千奇百怪,经常中间莫名出来一些材料。对于习惯了形式语言的程序员来说极其不友好。
|
||||||
|
|
||||||
|
|||||||
8
.gitlab-ci.yml
Normal file
8
.gitlab-ci.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
stages:
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
deploy_docker:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- docker build . -t hub.aiursoft.cn/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:latest
|
||||||
|
- docker push hub.aiursoft.cn/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME:latest
|
||||||
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# ============================
|
||||||
|
# Prepare Node Environment
|
||||||
|
FROM hub.aiursoft.cn/node:21-alpine as node-env
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
RUN node ./.github/readme-generate.js
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# Prepare Build Environment
|
||||||
|
FROM hub.aiursoft.cn/python:3.11 as python-env
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=node-env /app .
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
RUN mkdocs build --strict
|
||||||
|
|
||||||
|
# ============================
|
||||||
|
# Prepare Runtime Environment
|
||||||
|
FROM hub.aiursoft.cn/aiursoft/static
|
||||||
|
COPY --from=python-env /app/site /data
|
||||||
Reference in New Issue
Block a user