Skip to content

Commit

Permalink
Added: docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
capcom6 committed Dec 23, 2023
1 parent ed9f7ac commit a793bc1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ ifeq ($(OS),Windows_NT)
extension = .exe
endif

init:
run:
go run ./cmd/$(project_name)/main.go

init-dev:
go mod download \
&& go install github.com/cosmtrek/air@latest

init: init-dev
go mod download \
&& go install github.com/pressly/goose/v3/cmd/goose@latest \
&& go install github.com/cosmtrek/air@latest

air:
Expand All @@ -30,4 +36,13 @@ api-docs:
view-docs:
php -S 127.0.0.1:8080 -t ./api

docker-build:
docker build -f build/package/Dockerfile -t $(image_name) --build-arg APP=$(project_name) .

docker:
docker-compose -f deployments/docker-compose/docker-compose.yml up --build

docker-dev:
docker-compose -f deployments/docker-compose/docker-compose.dev.yml up --build

.PHONY: init air db-upgrade db-upgrade-raw test api-docs view-docs
16 changes: 16 additions & 0 deletions deployments/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3'
services:
bot:
image: capcom6/service-monitor-tgbot
build:
context: ../..
dockerfile: ./build/package/Dockerfile
args:
- APP=service-monitor-tgbot
env_file:
- ../../.env
environment:
- CONFIG_PATH=config.yml
stop_signal: SIGINT
volumes:
- ../../configs/config.yml:/app/config.yml:ro

0 comments on commit a793bc1

Please sign in to comment.