Updated docker commands and makefiles

This commit is contained in:
Benjamin Sherriff
2024-05-04 13:38:39 -04:00
parent 39d9850c41
commit e497ce243e
4 changed files with 29 additions and 28 deletions

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "service" name = "service"
version = "0.2.6" version = "0.2.7"
edition = "2021" edition = "2021"
authors = ["Ben Sherriff <hello@bensherriff.com>"] authors = ["Ben Sherriff <hello@bensherriff.com>"]
repository = "https://github.com/bensherriff/siren" repository = "https://github.com/bensherriff/siren"
@@ -12,32 +12,32 @@ name = "siren"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
actix-web = "4.4.0" actix-web = "4.5.1"
actix-cors = "0.6.4" actix-cors = "0.7.0"
actix-web-httpauth = "0.8.1" actix-web-httpauth = "0.8.1"
chrono = { version = "0.4.31", features = ["serde"] } chrono = { version = "0.4.37", features = ["serde"] }
dotenv = "0.15.0" dotenv = "0.15.0"
serde_json = "1.0.107" serde_json = "1.0.115"
log = "0.4.20" log = "0.4.21"
env_logger = "0.10.0" env_logger = "0.11.3"
diesel_migrations = { version = "2.1.0", features = ["postgres"] } diesel_migrations = { version = "2.1.0", features = ["postgres"] }
r2d2 = "0.8.10" r2d2 = "0.8.10"
lazy_static = "1.4.0" lazy_static = "1.4.0"
uuid = { version = "1.4.1", features = ["serde", "v4"] } uuid = { version = "1.8.0", features = ["serde", "v4"] }
argon2 = "0.5.2" argon2 = "0.5.3"
redis = { version = "0.23.3", features = ["tokio-comp", "connection-manager", "r2d2"] } redis = { version = "0.23.3", features = ["tokio-comp", "connection-manager", "r2d2"] }
rust-s3 = "0.33.0" rust-s3 = "0.33.0"
actix-multipart = "0.6.1" actix-multipart = "0.6.1"
rand = "0.8.5" rand = "0.8.5"
rand_chacha = "0.3.1" rand_chacha = "0.3.1"
jsonwebtoken = "9.2.0" jsonwebtoken = "9.3.0"
[dependencies.tokio] [dependencies.tokio]
version = "1.32.0" version = "1.37.0"
features = ["macros", "rt-multi-thread"] features = ["macros", "rt-multi-thread"]
[dependencies.serde] [dependencies.serde]
version = "1.0.188" version = "1.0.197"
features = ["derive"] features = ["derive"]
[dependencies.reqwest] [dependencies.reqwest]
@@ -46,7 +46,7 @@ default-features = false
features = ["json", "rustls-tls"] features = ["json", "rustls-tls"]
[dependencies.diesel] [dependencies.diesel]
version = "2.1.2" version = "2.1.5"
default-features = false default-features = false
features = ["postgres", "chrono", "32-column-tables", "serde_json", "r2d2", "with-deprecated"] features = ["postgres", "chrono", "32-column-tables", "serde_json", "r2d2", "with-deprecated"]

View File

@@ -10,23 +10,26 @@ help: ## Help command
@cat Makefile | grep -E '^[a-zA-Z\/_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' @cat Makefile | grep -E '^[a-zA-Z\/_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@echo @echo
build: ## Build the docker image up: ## Start the backend containers
docker compose build @docker compose --profile backend up -d
backend-up: ## Start the backend containers down: ## Stop the backend containers
docker compose --profile backend up -d @docker compose --profile backend down
backend-down: ## Stop the backend containers run: ## Run the app
docker compose --profile backend down @cargo run
up: ## Start the app docker-up: ## Start the app
docker compose up -d @docker compose --profile backend --profile siren up -d
down: ## Stop the app docker-down: ## Stop the app
docker compose down @docker compose --profile backend --profile siren down
docker-build: ## Build the docker image
@docker compose build
clean: ## Clean the app clean: ## Clean the app
docker compose down && \ @docker compose down && \
docker image rm siren-service || \ docker image rm siren-service || \
docker network rm siren_frontend || \ docker network rm siren_frontend || \
docker network rm siren-backend docker network rm siren-backend

View File

@@ -13,10 +13,10 @@ build: ## Install the dependencies and build
docker compose build docker compose build
up: ## Start the dev instance up: ## Start the dev instance
docker compose up -d docker compose --profile frontend up -d
down: ## Stop the dev instance down: ## Stop the dev instance
docker compose down docker compose --profile frontend down
lint: ## Run the linter lint: ## Run the linter
npm run lint npm run lint

View File

@@ -1,5 +1,3 @@
version: '3'
name: siren name: siren
services: services:
ui: ui: