Skip to content

Instantly share code, notes, and snippets.

View PatrickKalkman's full-sized avatar
🏠
Working from home

Patrick Kalkman PatrickKalkman

🏠
Working from home
View GitHub Profile
// path with routes files
const defaultPath = path.join(__dirname, './routes');
fastify.register(registerRoutes, {
regex: /((Route)|(Routes))\.js$/,
showTable: true,
path: defaultPath,
});
FROM node:12-alpine
WORKDIR /app
COPY . .
CMD [ "node", "index.js"]
version: '2.4'
services:
workflowengine:
build: .
ports:
- 8080:8080
volumes:
- .:/app
@PatrickKalkman
PatrickKalkman / Dockerfile
Last active January 19, 2020 09:58
Dockerfile with node_module one level up
FROM node:12-alpine
WORKDIR /node
COPY package*.json ./
RUN npm install && npm cache clean --force --loglevel=error
WORKDIR /node/app
@PatrickKalkman
PatrickKalkman / docker-compose.yml
Created January 18, 2020 10:51
docker compose with hidden node_modules folder
version: '2.4'
services:
workflowengine:
build: .
ports:
- 8080:8080
volumes:
- .:/node/app
- /node/app/node_modules
@PatrickKalkman
PatrickKalkman / docker-compose.yml
Created January 18, 2020 13:50
docker compose file including nodemon
version: '2.4'
services:
workflowengine:
build: .
command: /app/node_modules/.bin/nodemon ./index.js
ports:
- 8080:8080
volumes:
- .:/app
@PatrickKalkman
PatrickKalkman / docker-compose.yml
Created January 19, 2020 13:18
Depends_On including health checks
version: '2.4'
services:
workflowengine:
image: 'workflowengine:0.6.0'
depends_on:
workflowdb:
condition: service_healthy
environment:
- STORAGE_HOST=mongodb://mve-workflowengine:mve-workflowengine-password@workflowdb:27017/workflow-db?authMechanism=DEFAULT&authSource=workflow-db
ports:
@PatrickKalkman
PatrickKalkman / docker-compose.yml
Created January 19, 2020 14:03
Part of a docker-compose file that uses nginx-proxy as a reverse proxy
version: '2.4'
services:
nginx-proxy:
image: jwilder/nginx-proxy
port:
- "80:80"
volumes:
- /var/run/docker/docker.sock:/tmp/docker.sock
workflowengine:
@PatrickKalkman
PatrickKalkman / docker-compose.yml
Created January 19, 2020 14:40
Part of docker-compose file that uses Traefik as a reverse proxy
version: '2.4'
services:
traefik:
image: traefik:v1.7.20-alpine
port:
- "80:80"
volumes:
- /var/run/docker/docker.sock:/tmp/docker.sock
command:
- --docker
version: '2.4'
services:
workflowdb:
image: 'mongo:4.0.14'
environment:
- MONGO_INITDB_ROOT_USERNAME=mveroot
- MONGO_INITDB_ROOT_PASSWORD=2020minivideoencoder!
- MONGO_INITDB_DATABASE=workflow-db
volumes:
- workflowdatabase:/data.db