Skip to content

Instantly share code, notes, and snippets.

@pellizzetti
pellizzetti / Dockerfile
Created April 30, 2021 14:36
pm2 package example
FROM node:12-alpine AS installer
WORKDIR /home/node/app
COPY package.json yarn.* /home/node/app/
RUN npm pack pm2@4.4.0 && \
tar zxvf pm2-4.4.0.tgz && \
rm pm2-4.4.0.tgz && \
(cd package && yarn install)
COPY . /home/node/app/
@pellizzetti
pellizzetti / cache
Last active April 3, 2021 06:15
Yarn cache for ephemeral VMs using GCS + fuse (gcsfuse)
#!/bin/bash
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
ORANGE='\033[0;33m'
RED='\033[0;31m'
DEFAULT='\033[0m'
BUCKET=challenge-correction-cache
HOME_DIR=/home/deploy
@pellizzetti
pellizzetti / nginx.conf
Created August 25, 2016 18:52 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048