Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit a6497af

Browse files
committed
support docker build
1 parent bee2e0a commit a6497af

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!dist

Dockerfile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
FROM node:latest
2-
3-
RUN apt-get update; apt-get -y install git
4-
RUN wget -O caddy.tgz "https://caddyserver.com/download/build?os=linux&arch=amd64"
5-
RUN mkdir caddy
6-
RUN tar -xvzf caddy.tgz -C caddy
7-
RUN git clone https://github.com/hyperhq/website.git
8-
EXPOSE 8080
9-
ENV BRANCH develop
10-
CMD cd website && git checkout $BRANCH && git pull && /website/build.sh && /caddy/caddy -port 8080 -root /website/dist
1+
FROM abiosoft/caddy:latest
112

12-
# ./hyper pull imeoer/hyper-website:latest
13-
# ./hyper run --size=m1 --env BRANCH="develop" -d -p 80:8080 imeoer/hyper-website:latest
3+
COPY dist/ /srv

Dockerfile.old

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM node:latest
2+
3+
RUN apt-get update; apt-get -y install git
4+
RUN wget -O caddy.tgz "https://caddyserver.com/download/build?os=linux&arch=amd64"
5+
RUN mkdir caddy
6+
RUN tar -xvzf caddy.tgz -C caddy
7+
RUN git clone https://github.com/hyperhq/website.git
8+
EXPOSE 8080
9+
ENV BRANCH develop
10+
CMD cd website && git checkout $BRANCH && git pull && /website/build.sh && /caddy/caddy -port 8080 -root /website/dist
11+
12+
# ./hyper pull imeoer/hyper-website:latest
13+
# ./hyper run --size=m1 --env BRANCH="develop" -d -p 80:8080 imeoer/hyper-website:latest

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"main": "index.js",
66
"scripts": {
77
"start": "node server",
8-
"build": "NODE_ENV=production webpack --config webpack.config.prod.js --progress --colors && cd howto && ../ink_linux publish && cd .. && rm -rf dist && mv ./dist_tmp ./dist"
8+
"build": "NODE_ENV=production webpack --config webpack.config.prod.js --progress --colors && cd howto && ../ink_linux publish && cd .. && rm -rf dist && mv ./dist_tmp ./dist",
9+
"build-local": "NODE_ENV=production webpack --config webpack.config.prod.js --progress --colors && cd howto && ink publish && cd .. && rm -rf dist && mv ./dist_tmp ./dist",
10+
"docker": "npm run build-local && docker build -t imeoer/hyper-www ."
911
},
1012
"repository": {
1113
"type": "git",

0 commit comments

Comments
 (0)