Skip to content

Instantly share code, notes, and snippets.

View ivorscott's full-sized avatar

Ivor Scott Cummings ivorscott

View GitHub Profile
git clone https://github.com/ivorscott/go-delve-reload
cd go-delve-reload
git checkout starter
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch remote",
"type": "go",
"request": "attach",
"mode": "remote",
"cwd": "${workspaceFolder}/api",
"remotePath": "/api",
DOCKER_BUILDKIT=1 docker build --target dev --tag demo/api ./api
# 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/client ./client
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"
volumes:
postgres-db:
external: true
networks:
postgres-net:
external: true
traefik-public:
external: true
127.0.0.1 client.local api.local debug.api.local traefik.api.local pgadmin.local
traefik:
image: traefik:v2.1.2
command:
- "--api.insecure=true" # Not For Production
- "--api.debug=true"
- "--log.level=DEBUG"
- "--providers.docker"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=traefik-public"
- "--entrypoints.web.address=:80"
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https@docker"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"