deploy scripts
This commit is contained in:
parent
b84e5c707f
commit
84b7c983d9
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM 'node:14'
|
||||
|
||||
RUN mkdir -p /usr/src/app/src/
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
COPY ./src /usr/src/app/src
|
||||
COPY ./package.json /usr/src/app/package.json
|
||||
COPY ./.env /usr/src/app/.env
|
||||
|
||||
RUN npm install --only=prod
|
||||
EXPOSE 8043
|
||||
|
||||
CMD ["npm", "run", "up:prod"]
|
6
d-scripts/rerun.sh
Normal file
6
d-scripts/rerun.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker stop $(docker ps -q)
|
||||
docker volume remove multy_stub_volume
|
||||
docker volume create multy_stub_volume
|
||||
docker run --rm -v multy_stub_volume:/data/db -p 27017:27017 -d mongo
|
21
docker-compose.yaml
Normal file
21
docker-compose.yaml
Normal file
@ -0,0 +1,21 @@
|
||||
version: "3"
|
||||
|
||||
volumes:
|
||||
red-coder_volume:
|
||||
|
||||
services:
|
||||
mongoDb:
|
||||
image: mongo:latest
|
||||
volumes:
|
||||
- red-coder_volume:/data/db
|
||||
restart: always
|
||||
# ports:
|
||||
# - 27017:27017
|
||||
red-coder:
|
||||
build: .
|
||||
restart: always
|
||||
ports:
|
||||
- 8043:8043
|
||||
environment:
|
||||
- TZ=Europe/Moscow
|
||||
- MONGO_ADDR=mongodb
|
@ -6,7 +6,11 @@
|
||||
"scripts": {
|
||||
"start": "nodemon",
|
||||
"build": "tsc",
|
||||
"up:prod": "node dist/main"
|
||||
"up:prod": "node dist/main",
|
||||
"deploy:d:stop": "docker-compose down",
|
||||
"deploy:d:build": "docker-compose build",
|
||||
"deploy:d:up": "docker-compose up -d",
|
||||
"redeploy": "npm run deploy:d:stop && npm run deploy:d:build && npm run deploy:d:up"
|
||||
},
|
||||
"nodemonConfig": {
|
||||
"ignore": [
|
||||
|
Loading…
Reference in New Issue
Block a user