Skip to content

Instantly share code, notes, and snippets.

View ivorscott's full-sized avatar

Ivor Scott Cummings ivorscott

View GitHub Profile
127.0.0.1 client.local api.local debug.api.local traefik.api.local pgadmin.local
volumes:
postgres-db:
external: true
networks:
postgres-net:
external: true
traefik-public:
external: true
version: "3.7"
services:
traefik:
image: traefik:v2.1.2
container_name: traefik
command:
- "--api.insecure=true" # Not For Production
- "--api.debug=true"
- "--log.level=DEBUG"
- "--providers.docker"
DOCKER_BUILDKIT=1 docker build --target dev --tag demo/client ./client
# 1. Use the node apline image as the base stage of a multi-stage routine
FROM node:13.7.0-alpine as base
# 2. Set the working directory to /client
WORKDIR /client
# 3. Copy both package.json and package-lock.json into /client in the image's filesystem
COPY package*.json ./
# 4. Install only the production node_modules and clean up the cache
DOCKER_BUILDKIT=1 docker build --target dev --tag demo/api ./api
# 1. FROM sets the base image to use for subsequent instructions
# Use the golang alpine image as the base stage of a multi-stage routine
FROM golang:1.14-alpine as base
# 2. WORKDIR sets the working directory for any subsequent COPY, CMD, or RUN instructions
# Set the working directory to /api
WORKDIR /api
# 3. Extend aquasecurity's trivy image and create a new stage named trivy
# Used for robust image scanning
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch remote",
"type": "go",
"request": "attach",
"mode": "remote",
"cwd": "${workspaceFolder}/api",
"remotePath": "/api",
git clone https://github.com/ivorscott/go-delve-reload
cd go-delve-reload
git checkout starter
git clone https://github.com/ivorscott/go-delve-reload
cd go-delve-reload
git checkout part3