From 490d3392750a674582be2680249129601a4c1024 Mon Sep 17 00:00:00 2001 From: hunterlong Date: Thu, 27 Feb 2020 23:56:17 -0800 Subject: [PATCH] building --- Makefile | 8 +++++++- dev/Dockerfile.dev | 2 +- dev/docker-compose.lite.yml | 38 +++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 dev/docker-compose.lite.yml diff --git a/Makefile b/Makefile index 75d6072c..4484b60e 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ up: down: docker-compose -f docker-compose.yml -f dev/docker-compose.full.yml down --volumes --remove-orphans +lite: clean + docker-compose -f dev/docker-compose.lite.yml up -d --remove-orphans + reup: down clean compose-build-full up start: @@ -44,6 +47,9 @@ docker-latest: docker-base docker-vue: docker build -t hunterlong/statping:vue --build-arg VERSION=${VERSION} . +modd: + modd -f ./dev/modd.conf + top: docker-compose -f docker-compose.yml -f dev/docker-compose.full.yml top @@ -104,5 +110,5 @@ print_details: @echo \==== Monitoring and IDE ==== @echo \Grafana: http://localhost:3000 \(username: admin, password: admin\) -.PHONY: all build build-all build-alpine test-all test test-api docker frontend up down print_details +.PHONY: all build build-all build-alpine test-all test test-api docker frontend up down print_details lite .SILENT: travis_s3_creds diff --git a/dev/Dockerfile.dev b/dev/Dockerfile.dev index 7b05e40e..8bfb8fe1 100644 --- a/dev/Dockerfile.dev +++ b/dev/Dockerfile.dev @@ -29,7 +29,7 @@ RUN go get github.com/stretchr/testify/assert && \ go get gopkg.in/natefinch/lumberjack.v2 && \ go get golang.org/x/crypto/bcrypt && \ go get github.com/cortesi/devd/cmd/devd && \ - go get github.com/cortesi/modd/cmd/modd + env GO111MODULE=on go get github.com/cortesi/modd/cmd/modd ADD frontend/package.json frontend/yarn.lock ./frontend/ diff --git a/dev/docker-compose.lite.yml b/dev/docker-compose.lite.yml new file mode 100644 index 00000000..f6d30198 --- /dev/null +++ b/dev/docker-compose.lite.yml @@ -0,0 +1,38 @@ +version: '2.3' + +services: + + statping_dev: + container_name: statping_dev + build: + context: ./ + dockerfile: Dockerfile.dev + args: + VERSION: DEV + COMMIT: DEV + restart: on-failure + volumes: + - .:/go/src/github.com/hunterlong/statping:ro + environment: + DB_CONN: sqlite + API_KEY: exampleapikey + API_SECRET: exampleapisecret + NAME: Statping + DOMAIN: http://localhost:8585 + DESCRIPTION: This is a dev environment with auto reloading! + ADMIN_USER: admin + ADMIN_PASS: admin + PORT: 8585 + ports: + - 8888:8888 + - 8585:8585 + networks: + - statping + healthcheck: + test: ["CMD-SHELL", "curl -f http://localhost:8585/health || false"] + timeout: 2s + interval: 5s + retries: 10 + +networks: + statping: