Skip to content

Instantly share code, notes, and snippets.

deploy-dev:
machine: true
steps:
- checkout
- run:
name: Build and push Docker image to Heroku
command: |
sudo curl https://cli-assets.heroku.com/install.sh | sh
HEROKU_API_KEY=${HEROKU_TOKEN} heroku container:login
HEROKU_API_KEY=${HEROKU_TOKEN} heroku container:push -a python-django-starter web
workflows:
version: 2
test-build-deploy:
jobs:
- npm
- lint:
requires:
- npm
- build:
build:
docker:
- image: circleci/node:10.10.0-stretch-browsers-legacy
working_directory: ~/repo
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: Build
@fabripautasso
fabripautasso / dev-namespace.yml
Created February 18, 2020 13:02
Kubernetes namespace example
kind: Namespace
apiVersion: v1
metadata:
name: development
apiVersion: v1
kind: Service
metadata:
name: api
spec:
type: NodePort
ports:
- port: 80
targetPort: 3030
nodePort: 30000
apiVersion: v1
kind: ReplicationController
metadata:
name: api
spec:
replicas: 1
template:
metadata:
labels:
role: api
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "node-starter.fullname" . }}
labels:
{{- include "node-starter.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
# Default values for node-starter.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: fabripautasso/node-starter-v2
tag: 1.17.0
pullPolicy: IfNotPresent
apiVersion: v1
kind: Service
metadata:
name: {{ include "node-starter.fullname" . }}
labels:
{{- include "node-starter.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
@fabripautasso
fabripautasso / dive_initial_dockerfile
Created April 6, 2020 09:08
Initial Dockerfile, dive tutorial
# Start with Ubuntu Trusty
FROM phusion/baseimage:0.10.0
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
RUN apt-get update
RUN apt-get -y install wget
RUN apt-get -y install curl
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash