diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7b7511..536555a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,6 +41,7 @@ jobs: git clone https://github.com/uiwjs/uiwjs.github.io.git -b master uiwjs.github.io/code --depth 1 git clone https://github.com/webpack/webpack.js.org.git -b gh-pages webpack.js.org/code --depth 1 git clone https://github.com/jaywcjlove/doc-static.git -b zh-hans.reactjs.org zh-hans.reactjs.org/code --depth 1 + git clone https://github.com/jaywcjlove/doc-static.git -b v2 --single-branch typescriptlang.org/code --depth 1 # View the directory size and order by command, See if you need to reduce the size. - name: Echo directory size and order @@ -320,4 +321,21 @@ jobs: docker tag webpack.js.org ${{ secrets.DOCKER_USER }}/webpack.js.org:$VERSION docker tag webpack.js.org ${{ secrets.DOCKER_USER }}/webpack.js.org:latest docker push ${{ secrets.DOCKER_USER }}/webpack.js.org:$VERSION - docker push ${{ secrets.DOCKER_USER }}/webpack.js.org:latest \ No newline at end of file + docker push ${{ secrets.DOCKER_USER }}/webpack.js.org:latest + + - name: Build typescriptlang.org image + run: | + cd ./typescriptlang\.org + docker build -t typescriptlang.org . + - name: Tags & Push typescriptlang.org + run: | + # Strip git ref prefix from version + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + + # Strip "v" prefix from tag name + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + + docker tag typescriptlang.org ${{ secrets.DOCKER_USER }}/typescriptlang.org:$VERSION + docker tag typescriptlang.org ${{ secrets.DOCKER_USER }}/typescriptlang.org:latest + docker push ${{ secrets.DOCKER_USER }}/typescriptlang.org:$VERSION + docker push ${{ secrets.DOCKER_USER }}/typescriptlang.org:latest \ No newline at end of file diff --git a/README.md b/README.md index 850f06e..49643ac 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,10 @@ Docker Image | Port/Github | Version | Image Size | Docker Pull [@wcjiang/react-native](https://hub.docker.com/r/wcjiang/react-native) | 60005| ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/react-native) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/react-native) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/react-native) [@wcjiang/sequelize.org](https://hub.docker.com/r/wcjiang/sequelize.org) | 60034/[Github](https://github.com/sequelize/sequelize.org) | ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/sequelize.org) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/sequelize.org) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/sequelize.org) [@wcjiang/typeorm.github.io](https://hub.docker.com/r/wcjiang/typeorm.github.io) | 60006| ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/typeorm.github.io) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/typeorm.github.io) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/typeorm.github.io) -[@wcjiang/zh-hans.reactjs.org](https://hub.docker.com/r/wcjiang/zh-hans.reactjs.org) | 60007 | ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/zh-hans.reactjs.org) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/zh-hans.reactjs.org) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/zh-hans.reactjs.org) -[@wcjiang/webpack.js.org](https://hub.docker.com/r/wcjiang/webpack.js.org) | 60012/[Github](https://github.com/webpack/webpack.js.org) | ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/webpack.js.org) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/webpack.js.org) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/webpack.js.org) +[@wcjiang/typescriptlang.org](https://hub.docker.com/r/wcjiang/typescriptlang.org) | 60006| ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/typescriptlang.org) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/typescriptlang.org) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/typescriptlang.org) [@wcjiang/uiwjs.github.io](https://hub.docker.com/r/wcjiang/uiwjs.github.io) | 60066/[Github](https://github.com/uiwjs/uiwjs.github.io) | ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/uiwjs.github.io) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/uiwjs.github.io) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/uiwjs.github.io) +[@wcjiang/webpack.js.org](https://hub.docker.com/r/wcjiang/webpack.js.org) | 60012/[Github](https://github.com/webpack/webpack.js.org) | ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/webpack.js.org) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/webpack.js.org) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/webpack.js.org) +[@wcjiang/zh-hans.reactjs.org](https://hub.docker.com/r/wcjiang/zh-hans.reactjs.org) | 60007 | ![Docker Image Version (latest by date)](https://img.shields.io/docker/v/wcjiang/zh-hans.reactjs.org) | ![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/wcjiang/zh-hans.reactjs.org) | ![Docker Pulls](https://img.shields.io/docker/pulls/wcjiang/zh-hans.reactjs.org) ## Port List @@ -54,6 +55,7 @@ docker run --name docs \ -p 60012:60012 \ -p 60013:60013 \ -p 60014:60014 \ + -p 60015:60015 \ -p 60066:60066 \ -p 60031:60031 \ -p 60034:60034 \ diff --git a/docker-compose.yml b/docker-compose.yml index a50ef43..f179479 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -48,6 +48,10 @@ services: image: wcjiang/typeorm.github.io:latest ports: - 60006:60006 + typescriptlang.org: + image: wcjiang/typescriptlang.org:latest + ports: + - 60015:60015 uiwjs.github.io: image: wcjiang/uiwjs.github.io:latest ports: diff --git a/nginx/web.conf b/nginx/web.conf index ae0d6a4..b7156a7 100644 --- a/nginx/web.conf +++ b/nginx/web.conf @@ -110,6 +110,14 @@ server { } } +server { + listen 60015; + root /usr/share/nginx/web/typescriptlang.org; + location / { + try_files $uri $uri/ /index.html =404; + } +} + server { listen 60031; root /usr/share/nginx/web/sequelize.org/v3; diff --git a/typescriptlang.org/.dockerignore b/typescriptlang.org/.dockerignore new file mode 100644 index 0000000..dff7c91 --- /dev/null +++ b/typescriptlang.org/.dockerignore @@ -0,0 +1,43 @@ +# we try to aoid adding files to the docker images that change often +# or that are not needed for running the docker image +# tis greatly reduces the amount of times we need to rerun `npm install` when building image locally +# https://codefresh.io/blog/not-ignore-dockerignore/ +# https://docs.docker.com/engine/reference/builder/#dockerignore-file + +*.git +code/.git + +# consider them hidden +.* +# you can add exceptions like in .gitignore to maintain a whitelist: +# e.g. +!.babelrc +!.eslintrc +!.eslintignore +!.stylelintrc +!.flowconfig +!.jest.config.js +!.jestEnvironment.js + +# do not copy over node_modules we will run `npm install` anyway +node_modules + +# output from test runs and similar things +*.log +*.pid +log +coverage/ +*.rdb +.vscode/ +.git +*.log + +# IDE config files +jsconfig.json +*.iml + +# let's not get to recursive ;) +Dockerfile* +docker-compose*.yaml + +README.md \ No newline at end of file diff --git a/typescriptlang.org/Dockerfile b/typescriptlang.org/Dockerfile new file mode 100644 index 0000000..f4596c8 --- /dev/null +++ b/typescriptlang.org/Dockerfile @@ -0,0 +1,14 @@ +# 构建镜像的基础源镜像 +FROM nginx:1.18.0 + +ENV APPDIR /usr/share/nginx/web +RUN mkdir -p $APPDIR + +WORKDIR $APPDIR + +ADD ./code $APPDIR + +COPY web.conf /etc/nginx/conf.d +RUN cat /etc/nginx/conf.d/web.conf + +EXPOSE 60015 \ No newline at end of file diff --git a/typescriptlang.org/README.md b/typescriptlang.org/README.md new file mode 100644 index 0000000..bd10ae1 --- /dev/null +++ b/typescriptlang.org/README.md @@ -0,0 +1,14 @@ +typescriptlang.org +--- + +> Port: `60015` - [typescriptlang.org](https://typeorm.io/) + +```shell +docker pull wcjiang/typescriptlang.org:latest +``` + +Run Server + +```shell +docker run --name typescriptlang.org -p 60015:60015 --restart=always -d wcjiang/typescriptlang.org:latest +``` \ No newline at end of file diff --git a/typescriptlang.org/web.conf b/typescriptlang.org/web.conf new file mode 100644 index 0000000..264f27c --- /dev/null +++ b/typescriptlang.org/web.conf @@ -0,0 +1,8 @@ + +server { + listen 60015; + root /usr/share/nginx/web/typescriptlang.org; + location / { + try_files $uri $uri/ /index.html =404; + } +}