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

Commit b0d6a16

Browse files
committed
build(improve): reduce size of docker-version deps, make task naming
1 parent 6d5661a commit b0d6a16

File tree

12 files changed

+231
-183
lines changed

12 files changed

+231
-183
lines changed

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include Makefile.include.mk
22

33
help:
4-
$(call launch.help)
4+
$(call serve.help)
55
$(call gen.help)
66
$(call commit.help)
77
$(call release.help)
@@ -18,7 +18,7 @@ init:
1818
dep:
1919
npm install # for commitizen
2020

21-
# shortcut for launch.local
21+
# shortcut for serve.local
2222
dev:
2323
npm run local
2424

@@ -31,18 +31,18 @@ build.dev:
3131
build.prod:
3232
npm run build.prod
3333

34-
launch.help:
35-
$(call launch.help)
34+
serve.help:
35+
$(call serve.help)
3636
@echo "\n"
37-
launch:
38-
$(call launch.help)
37+
serve:
38+
$(call serve.help)
3939
@echo "\n"
40-
launch.local:
40+
serve.local:
4141
npm run local
42-
launch.dev:
43-
npm run launch.dev
44-
launch.prod:
45-
npm run launch.prod
42+
serve.dev:
43+
npm run serve.dev
44+
serve.prod:
45+
npm run serve.prod
4646

4747
gen.help:
4848
$(call gen.help)

Makefile.include.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ define browse
3939
$(BROWSER_TOOL) "$(1)"
4040
endef
4141

42-
define launch.help
42+
define serve.help
4343
@echo "\n"
44-
@echo " [valid launch commands]"
44+
@echo " [valid serve commands]"
4545
@echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
4646
@echo " dev : start web server in local env"
4747
@echo " | HMR is enabled"
4848
@echo " ....................................................."
49-
@echo " launch.dev : start web server in development env"
49+
@echo " serve.dev : start web server in development env"
5050
@echo " | HMR is disenabled"
5151
@echo " ....................................................."
52-
@echo " launch.prod : start web server in produnction env"
52+
@echo " serve.prod : start web server in produnction env"
5353
@echo " | HMR is disenabled"
5454
@echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
5555
endef

deploy/dev/loader.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

33
cd /root/web/
4-
# npm run launch:dev &
5-
pm2-runtime start npm --name "coderplanets_web" -- run launch:dev &
4+
# npm run serve:dev &
5+
pm2-runtime start npm --name "coderplanets_web" -- run serve:dev &
66

77
while true
88
do

deploy/dev/packer.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ fi
1414
mkdir "${PACKER_TMP_DIR}"
1515

1616
echo "[Step 2/${TOTAL_STEPS}] cp files to ${PACKER_TMP_DIR} ..."
17-
# cp -rf pages lang containers components stores config static utils next.config.js .babelrc "${PACKER_TMP_DIR}"
18-
cp -rf pages lang containers components services stores config static utils .babelrc next.config.js next-seo.config.js server.js "${PACKER_TMP_DIR}"
17+
cp -rf pages lang containers components services stores config static utils .babelrc next-seo.config.js server.js "${PACKER_TMP_DIR}"
1918
cp Makefile Makefile.include.mk "${PACKER_TMP_DIR}"
20-
cp package-docker.json "${PACKER_TMP_DIR}/package.json"
21-
# cp package.json "${PACKER_TMP_DIR}/package.json"
19+
cp package.docker.json "${PACKER_TMP_DIR}/package.json"
20+
cp next.config.docker.js "${PACKER_TMP_DIR}/next.config.js"
2221

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

deploy/production/loader.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
cd /root/web/
44

55
# make build.prod
6-
pm2-runtime start npm --name "coderplanets_web" -- run launch.prod &
6+
pm2-runtime start npm --name "coderplanets_web" -- run serve.prod &
77

88
while true
99
do

deploy/production/packer.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ fi
1414
mkdir "${PACKER_TMP_DIR}"
1515

1616
echo "[Step 2/${TOTAL_STEPS}] cp files to ${PACKER_TMP_DIR} ..."
17-
# cp -rf pages lang containers components stores config static utils next.config.js .babelrc "${PACKER_TMP_DIR}"
18-
cp -rf pages lang containers components services stores config static utils .babelrc next.config.js next-seo.config.js server.js "${PACKER_TMP_DIR}"
17+
cp -rf pages lang containers components services stores config static utils .babelrc next-seo.config.js server.js "${PACKER_TMP_DIR}"
1918
cp Makefile Makefile.include.mk "${PACKER_TMP_DIR}"
20-
cp package-docker.json "${PACKER_TMP_DIR}/package.json"
19+
cp package.docker.json "${PACKER_TMP_DIR}/package.json"
20+
cp next.config.docker.js "${PACKER_TMP_DIR}/next.config.js"
2121

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

0 commit comments

Comments
 (0)