Add docker files
This commit is contained in:
parent
63c94365ce
commit
d10593dd7c
23
.dockerignore
Normal file
23
.dockerignore
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
**/.classpath
|
||||||
|
**/.dockerignore
|
||||||
|
**/.env
|
||||||
|
**/.git
|
||||||
|
**/.gitignore
|
||||||
|
**/.project
|
||||||
|
**/.settings
|
||||||
|
**/.toolstarget
|
||||||
|
**/.vs
|
||||||
|
**/.vscode
|
||||||
|
**/*.*proj.user
|
||||||
|
**/*.dbmdl
|
||||||
|
**/*.jfm
|
||||||
|
**/charts
|
||||||
|
**/docker-compose*
|
||||||
|
**/compose*
|
||||||
|
**/Dockerfile*
|
||||||
|
**/node_modules
|
||||||
|
**/npm-debug.log
|
||||||
|
**/obj
|
||||||
|
**/secrets.dev.yaml
|
||||||
|
**/values.dev.yaml
|
||||||
|
README.md
|
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM node:lts-alpine
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
WORKDIR /usr/src/app
|
||||||
|
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
||||||
|
RUN npm install --production --silent && mv node_modules ../
|
||||||
|
COPY . .
|
||||||
|
EXPOSE 3000
|
||||||
|
RUN chown -R node /usr/src/app
|
||||||
|
USER node
|
||||||
|
CMD ["npm", "start"]
|
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
version: "3.4"
|
||||||
|
|
||||||
|
services:
|
||||||
|
imageify:
|
||||||
|
image: imageify
|
||||||
|
restart: always
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: ./Dockerfile
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
ports:
|
||||||
|
- 3000:3000
|
||||||
|
volumes:
|
||||||
|
- ./.storage:/.storage
|
||||||
|
|
||||||
|
mongo:
|
||||||
|
image: mongo:latest
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: imageify
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: reallysecuremongopassword
|
||||||
|
volumes:
|
||||||
|
- ./mongodb:/data
|
Reference in New Issue
Block a user