From ea859546eea841f3de8ea31b129f7edfc2a0777a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=24i=D1=85?= Date: Mon, 8 Aug 2022 00:39:22 +0300 Subject: [PATCH] feat: add docker compose run configuration --- .run/build and run as service.run.xml | 11 +++++++++++ .run/debug as service.run.xml | 12 ++++++++++++ Makefile | 2 +- docker-compose-debug.yml | 17 +++++++++++++++++ docker-compose.yml | 9 +++++++++ 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .run/build and run as service.run.xml create mode 100644 .run/debug as service.run.xml create mode 100644 docker-compose-debug.yml create mode 100644 docker-compose.yml diff --git a/.run/build and run as service.run.xml b/.run/build and run as service.run.xml new file mode 100644 index 0000000..64d6024 --- /dev/null +++ b/.run/build and run as service.run.xml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/.run/debug as service.run.xml b/.run/debug as service.run.xml new file mode 100644 index 0000000..1735dd9 --- /dev/null +++ b/.run/debug as service.run.xml @@ -0,0 +1,12 @@ + + + + + + + + + \ No newline at end of file diff --git a/Makefile b/Makefile index 9d6d715..18131b1 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ ifneq (,$(wildcard ./.env)) endif fmt: ## Format and fix import order - goimports -w -local "e46" $(SRC) + goimports -w -local "golang-app" $(SRC) help: ## Display this help screen @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/docker-compose-debug.yml b/docker-compose-debug.yml new file mode 100644 index 0000000..faa50f1 --- /dev/null +++ b/docker-compose-debug.yml @@ -0,0 +1,17 @@ +version: '3.7' + +services: + golang-app-debug: + container_name: golang-app + build: + context: . + dockerfile: Debug.Dockerfile + security_opt: + - apparmor=unconfined + cap_add: + - SYS_PTRACE + environment: + - TOKEN=${TOKEN} + - OWNER=${OWNER} + ports: + - "4040:4040" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..c515aac --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3.7' + +services: + golang-app: + container_name: golang-app + image: psssix/golang-app:latest + environment: + - TOKEN=${TOKEN} + - OWNER=${OWNER} \ No newline at end of file