Skip to content

Commit

Permalink
Add typescriptlang.org
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 30, 2020
1 parent 75b1d71 commit a4973e0
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 3 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 \
Expand Down
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions nginx/web.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
43 changes: 43 additions & 0 deletions typescriptlang.org/.dockerignore
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions typescriptlang.org/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions typescriptlang.org/README.md
Original file line number Diff line number Diff line change
@@ -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
```
8 changes: 8 additions & 0 deletions typescriptlang.org/web.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

server {
listen 60015;
root /usr/share/nginx/web/typescriptlang.org;
location / {
try_files $uri $uri/ /index.html =404;
}
}

0 comments on commit a4973e0

Please sign in to comment.