repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
3901821
parent
86f56c1
author
Antonio Mika
date
2022-08-02 22:29:50 +0000 UTC
Add new make targets for docker compose
1 files changed,  +34, -0
M Makefile
+34, -0
 1@@ -6,6 +6,8 @@ DB_CONTAINER?=pico-postgres-1
 2 DOCKER_TAG?=$(shell git log --format="%H" -n 1)
 3 DOCKER_PLATFORM?=linux/amd64,linux/arm64
 4 DOCKER_BUILDX_BUILD?=docker buildx build --push --platform $(DOCKER_PLATFORM)
 5+DOCKER_COMPOSE_PROD?=docker compose -f docker-compose.yml -f docker-compose.prod.yml --profile services --profile caddy --env-file .env.prod
 6+DOCKER_COMPOSE_DEV?=docker compose --profile services --env-file .env.example
 7 
 8 lint:
 9 	docker run --rm -v $(shell pwd):/app -w /app golangci/golangci-lint:latest golangci-lint run -E goimports -E godot
10@@ -80,3 +82,35 @@ restore:
11 	docker exec -it $(DB_CONTAINER) /bin/bash
12 	# psql postgres -U postgres -d pico < /backup.sql
13 .PHONY: restore
14+
15+compose-prod-up:
16+	$(DOCKER_COMPOSE_PROD) up -d
17+.PHONY: compose-prod-up
18+
19+compose-prod-down:
20+	$(DOCKER_COMPOSE_PROD) down
21+.PHONY: compose-prod-down
22+
23+compose-prod-pull:
24+	$(DOCKER_COMPOSE_PROD) pull
25+.PHONY: compose-prod-pull
26+
27+compose-prod-logs:
28+	$(DOCKER_COMPOSE_PROD) logs -f
29+.PHONY: compose-prod-logs
30+
31+compose-dev-up:
32+	$(DOCKER_COMPOSE_DEV) up -d
33+.PHONY: compose-dev-up
34+
35+compose-dev-down:
36+	$(DOCKER_COMPOSE_DEV) down
37+.PHONY: compose-dev-down
38+
39+compose-dev-pull:
40+	$(DOCKER_COMPOSE_DEV) pull
41+.PHONY: compose-dev-pull
42+
43+compose-dev-logs:
44+	$(DOCKER_COMPOSE_DEV) logs -f
45+.PHONY: compose-dev-logs