Working on sky conditions display:

This commit is contained in:
2023-09-30 00:44:20 -04:00
parent 1dd750fb5e
commit 41bd65cee8
10 changed files with 492 additions and 112 deletions

36
service/Makefile Normal file
View File

@@ -0,0 +1,36 @@
#!make
include .env
SHELL := /bin/bash
.PHONY: help build start stop lint
help: ## This info
@echo
@cat Makefile | grep -E '^[a-zA-Z\/_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@echo
build: ## Build Docker containers
docker compose build
up: ## Start Docker containers
docker compose up -d
down: ## Stop Docker containers
docker compose down
connect: ## Connect to the Weather DB
docker exec -it ${DATABASE_CONTAINER} psql -U postgres
clean: ## Cleanup Docker containers
docker compose down && \
docker image rm weather-service || \
docker network rm weather-frontend || \
docker network rm weather-backend
clean-db: ## Remove database
docker exec -i ${DATABASE_CONTAINER} sh -c 'PGPASSWORD=${DATABASE_PASSWORD} psql -U ${DATABASE_USER} -d postgres -c "DROP DATABASE IF EXISTS \"${DATABASE_NAME}\";"'
docker exec -i ${DATABASE_CONTAINER} sh -c 'PGPASSWORD=${DATABASE_PASSWORD} psql -U ${DATABASE_USER} -d postgres -c "CREATE DATABASE \"${DATABASE_NAME}\";"' || true