Skip to content

Commit

Permalink
opt nodejs image
Browse files Browse the repository at this point in the history
  • Loading branch information
enimo committed Aug 24, 2021
1 parent 33c4e86 commit 0b73488
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions docker-compose.yml
Expand Up @@ -142,13 +142,11 @@ services:

nodejs:
container_name: nodejs14.17
# image: ccr.ccs.tencentyun.com/tcb-87669051-ffhh/nginx:v20210707
build: ./nodejs/
image: ccr.ccs.tencentyun.com/tcb-saas/nodejs:v20210824
# build: ./nodejs/
ports:
# - "80:80"
# - "443:443"
- "9101:9101"
- "9102:9102"
# - "9102:9102" #建议一个nodejs service容器只运行一个node app应用
volumes:
- ./nodejs/app:/srv/app:rw,cached
- ./conf/nodejs:/etc/nodejs:ro,cached
Expand Down
2 changes: 1 addition & 1 deletion nodejs/Dockerfile
Expand Up @@ -52,5 +52,5 @@ RUN npm install --global http-server
# ENTRYPOINT ["docker-entrypoint.sh"]

# CMD ["npm", "start"]
CMD ["http-server", "./ --port 9101"]
CMD ["http-server", "-p 9101", "./", "--cors"]

6 changes: 3 additions & 3 deletions nodejs/app/test.html
Expand Up @@ -26,13 +26,13 @@
let vm = new SimpleVue({
el: '#simpleVue',
data: {
name: 'xxxx',
webSite: 'https://github.com/',
name: 'enimo',
webSite: 'https://github.com/enimo',
isShow: true
},
methods: {
copy() {
this.name += 'xxxx';
this.name += 'test';
},
show() {
if (this.isShow) {
Expand Down

0 comments on commit 0b73488

Please sign in to comment.