Add Dockerfile and update .dockerignore.
parent
e0812afb56
commit
fb523804ec
|
@ -1,11 +1,35 @@
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directory
|
||||||
|
# Deployed apps should consider commenting this line out:
|
||||||
|
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Webpack output
|
||||||
|
/dist
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
.git*
|
|
||||||
|
|
||||||
Dockerfile
|
Dockerfile
|
||||||
.dockerignore
|
|
||||||
|
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
|
.git*
|
||||||
*.md
|
*.md
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
FROM icedream/caddy
|
||||||
|
|
||||||
|
COPY . /src/
|
||||||
|
RUN \
|
||||||
|
(cd /src \
|
||||||
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
|
nodejs-lts \
|
||||||
|
&& npm i \
|
||||||
|
&& NODE_ENV=production npm run build \
|
||||||
|
&& rm -rf /data \
|
||||||
|
&& mv dist /data \
|
||||||
|
&& apk del --no-cache .build-deps \
|
||||||
|
) \
|
||||||
|
&& rm -rf /src /tmp/* /var/tmp/*
|
||||||
|
|
||||||
|
WORKDIR /data
|
||||||
|
EXPOSE 2015
|
Loading…
Reference in New Issue