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

Commit f139b11

Browse files
committed
chore(deploy): debug producton process
1 parent 8f2f27f commit f139b11

File tree

8 files changed

+12
-52
lines changed

8 files changed

+12
-52
lines changed

.env

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
SERVE_PORT=3000
33
// google analysis
44
NEXT_PUBLIC_GA_TRACING_ID=UA-39874160-3
5-
// sentry
6-
NEXT_PUBLIC_SENTRY_TOKEN=https://c3736f9e69124719b594e8a746815a26@sentry.io/1260565
75
// github
86
NEXT_PUBLIC_GITHUB_CLIENT_ID=3b4281c5e54ffd801f85
97

.env.production

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// .env
2+
SERVE_PORT=8002
3+
// google analysis
4+
NEXT_PUBLIC_GA_TRACING_ID=UA-39874160-3
5+
// github
6+
NEXT_PUBLIC_GITHUB_CLIENT_ID=3b4281c5e54ffd801f85
7+

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ tsconfig.tsbuildinfo
1212
*.md
1313
*.ico
1414
*.hbs
15-
*.css
15+
*.css
16+
./deploy*

.huskyrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"hooks": {
3-
"pre-commit": "pretty-quick --staged && npm run lint:staged",
43
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
54
}
65
}

deploy/production/Dockerfile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,8 @@ FROM node:12.3.1
33
RUN mkdir /root/web
44

55
ADD web.tar.gz /root/web
6-
RUN npm install -g pm2 --registry=https://registry.npm.taobao.org
7-
RUN cd /root/web/ && npm install --registry=https://registry.npm.taobao.org --production
8-
RUN cd /root/web/ && npm i terser@3.14
9-
10-
RUN mkdir -p ~/bin && curl -sSL -o ~/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && chmod +x ~/bin/jq
11-
RUN export PATH=$PATH:~/bin
12-
RUN jq --version
13-
6+
RUN npm install -g pm2
7+
RUN cd /root/web/ && npm install--production
148
RUN cd /root/web/ && make build.prod
159

1610
ADD loader.sh /usr/local/bin/loader.sh

deploy/production/packer.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ fi
1414
mkdir "${PACKER_TMP_DIR}"
1515

1616
echo "[Step 2/${TOTAL_STEPS}] cp files to ${PACKER_TMP_DIR} ..."
17-
cp -rf pages src config static utils .babelrc next-seo.config.js server.js package.json package-lock.json "${PACKER_TMP_DIR}"
17+
cp -rf src config public utils .babelrc next-seo.config.js server.js package.json package-lock.json next.config.js "${PACKER_TMP_DIR}"
1818
cp Makefile Makefile.include.mk "${PACKER_TMP_DIR}"
19-
cp next.config.docker.js "${PACKER_TMP_DIR}/next.config.js"
2019

2120
echo "[Step 3/${TOTAL_STEPS}] creating ${ARCHIVE_NAME} ..."
2221
cd "${PACKER_TMP_DIR}"

deploy/production/web.tar.gz

3.8 MB
Binary file not shown.

next.config.docker.js

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)