generated from alecodes/base-template
chore: remove unecesary dependencies
remove docker database files
This commit is contained in:
parent
6ee345763f
commit
4e0f09de34
13 changed files with 0 additions and 215 deletions
|
|
@ -1,29 +0,0 @@
|
||||||
services:
|
|
||||||
db:
|
|
||||||
image: postgres:17-alpine
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: ${CPD_DB_USER}
|
|
||||||
POSTGRES_PASSWORD: ${CPD_DB_PASSWORD}
|
|
||||||
POSTGRES_DB: ${CPD_DB_NAME}
|
|
||||||
|
|
||||||
adminer:
|
|
||||||
image: ghcr.io/shyim/adminerevo:latest
|
|
||||||
ports:
|
|
||||||
- 8080:8080
|
|
||||||
environment:
|
|
||||||
ADMINER_DEFAULT_DRIVER: psql
|
|
||||||
ADMINER_DEFAULT_SERVER: db
|
|
||||||
ADMINER_DEFAULT_USER: ${CPD_DB_USER}
|
|
||||||
ADMINER_DEFAULT_PASSWORD: ${CPD_DB_PASSWORD}
|
|
||||||
ADMINER_DEFAULT_DB: ${CPD_DB_NAME}
|
|
||||||
|
|
||||||
dbmate:
|
|
||||||
image: ghcr.io/amacneil/dbmate
|
|
||||||
restart: no
|
|
||||||
command: ["--wait", "migrate"]
|
|
||||||
volumes:
|
|
||||||
- ${PWD}/db:/db
|
|
||||||
environment:
|
|
||||||
DATABASE_URL: postgres://${CPD_DB_USER}:${CPD_DB_PASSWORD}@db:5432/${CPD_DB_NAME}?sslmode=disable
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
services:
|
|
||||||
compendium:
|
|
||||||
image: compendium:latest
|
|
||||||
restart: unless-stopped
|
|
||||||
depends_on:
|
|
||||||
- db
|
|
||||||
ports:
|
|
||||||
- 3000:3000
|
|
||||||
env_file:
|
|
||||||
- ../../.env
|
|
||||||
db:
|
|
||||||
image: postgres:17-alpine
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: ${CPD_DB_USER}
|
|
||||||
POSTGRES_PASSWORD: ${CPD_DB_PASSWORD}
|
|
||||||
POSTGRES_DB: ${CPD_DB_NAME}
|
|
||||||
|
|
||||||
adminer:
|
|
||||||
image: ghcr.io/shyim/adminerevo:latest
|
|
||||||
ports:
|
|
||||||
- 8080:8080
|
|
||||||
environment:
|
|
||||||
ADMINER_DEFAULT_DRIVER: psql
|
|
||||||
ADMINER_DEFAULT_SERVER: db
|
|
||||||
ADMINER_DEFAULT_USER: ${CPD_DB_USER}
|
|
||||||
ADMINER_DEFAULT_PASSWORD: ${CPD_DB_PASSWORD}
|
|
||||||
ADMINER_DEFAULT_DB: ${CPD_DB_NAME}
|
|
||||||
|
|
||||||
dbmate:
|
|
||||||
image: ghcr.io/amacneil/dbmate
|
|
||||||
restart: no
|
|
||||||
command: ["--wait", "migrate"]
|
|
||||||
volumes:
|
|
||||||
- ${PWD}/db:/db
|
|
||||||
environment:
|
|
||||||
DATABASE_URL: postgres://${CPD_DB_USER}:${CPD_DB_PASSWORD}@db:5432/${CPD_DB_NAME}?sslmode=disable
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euxo pipefail
|
|
||||||
|
|
||||||
cog verify --file "$1"
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euxo pipefail
|
|
||||||
|
|
||||||
root="$(git rev-parse --show-toplevel)"
|
|
||||||
|
|
||||||
cd "$root"
|
|
||||||
|
|
||||||
gitleaks git
|
|
||||||
|
|
||||||
# Only validate encrypted files if we are tracking any
|
|
||||||
if [[ -e .ageboxreg.yml ]]; then
|
|
||||||
agebox validate --no-decrypt
|
|
||||||
fi
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
set dotenv-load := true
|
|
||||||
|
|
||||||
export PATH := source_dir() + "/bin:" + source_dir() + "/scripts:" + env("PATH")
|
|
||||||
export AGEBOX_DEBUG := "0"
|
|
||||||
export AGEBOX_PUBLIC_KEYS := source_dir() + "/public_keys.txt"
|
|
||||||
|
|
||||||
# Install agebox from the latest github realse
|
|
||||||
install-agebox:
|
|
||||||
curl -sSL "https://github.com/slok/agebox/releases/latest/download/agebox-linux-amd64" -o .devfiles/bin/agebox
|
|
||||||
chmod + x .devfiles/bin/agebox
|
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
install-hooks:
|
|
||||||
cog install-hook --all
|
|
||||||
|
|
||||||
# Easy and simple file repository encryption tool based on Age.
|
|
||||||
agebox +ARGS="--help":
|
|
||||||
@.devfiles/bin/agebox {{ ARGS }}
|
|
||||||
|
|
||||||
# Encrypt the provided files, relative to project root.
|
|
||||||
encrypt +FILES: (agebox "encrypt " + FILES)
|
|
||||||
|
|
||||||
# Encrypt all the tracked files.
|
|
||||||
encrypt-all: (agebox "encrypt --all")
|
|
||||||
|
|
||||||
# Decrypt the provided files, relative to project root.
|
|
||||||
decrypt +FILES: (agebox "decrypt " + FILES)
|
|
||||||
|
|
||||||
# Decrypt all the tracked files.
|
|
||||||
decrypt-all: (agebox "decrypt --all --force")
|
|
||||||
|
|
||||||
# Reencrypt all the tracked files with the new public keys.
|
|
||||||
reencrypt: (agebox "reencrypt")
|
|
||||||
|
|
||||||
# Show the content of an encrypted file to stdout.
|
|
||||||
crypt-peek +FILES: (agebox "cat " + FILES)
|
|
||||||
|
|
||||||
# Validate that all tracked files are encrypted.
|
|
||||||
crypt-check:(agebox "validate --no-decrypt ")
|
|
||||||
|
|
||||||
# Validate no credentials are pushed to git
|
|
||||||
leaks:
|
|
||||||
@gitleaks git --verbose --redact
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
# anavarro
|
|
||||||
age1gj7hj894l0a0lvu3fsndlkdkyc0da7963kcqhpfe43reflx3gafqnm058u
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
root="$(git rev-parse --show-toplevel)"
|
|
||||||
|
|
||||||
export PATH=$root/.devfiles/bin:$root/.devfiles/scripts:$PATH
|
|
||||||
|
|
||||||
devtools=(
|
|
||||||
age
|
|
||||||
agebox
|
|
||||||
cog
|
|
||||||
gitleaks
|
|
||||||
)
|
|
||||||
|
|
||||||
missing_tools=()
|
|
||||||
|
|
||||||
for cmd in "${devtools[@]}"; do
|
|
||||||
if ! command -v "$cmd" &>/dev/null; then
|
|
||||||
missing_tools+=("$cmd")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ ${#missing_tools[@]} != 0 ]]; then
|
|
||||||
echo "The following tools where not found:"
|
|
||||||
printf "%s\n" "${missing_tools[@]}"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo -e "All tools are installed!"
|
|
||||||
fi
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
root="$(git rev-parse --show-toplevel)"
|
|
||||||
|
|
||||||
base_url="https://git.alecodes.page/api/v1/gitignore/templates"
|
|
||||||
|
|
||||||
query="$*"
|
|
||||||
|
|
||||||
list_available() {
|
|
||||||
curl -Ssl $base_url | jq -r '.[]'
|
|
||||||
}
|
|
||||||
|
|
||||||
if [[ -z $query ]]; then
|
|
||||||
list_available
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
tmp_file="$(mktemp)"
|
|
||||||
|
|
||||||
for template in $query; do
|
|
||||||
# Capitalize the string
|
|
||||||
template=${template,,}
|
|
||||||
template=${template^}
|
|
||||||
|
|
||||||
response="$(curl -Ssl "$base_url/$template")"
|
|
||||||
name="$(echo "$response" | jq -r '.name')"
|
|
||||||
content="$(echo "$response" | jq -r '.source')"
|
|
||||||
|
|
||||||
if [[ "$content" == "null" ]]; then
|
|
||||||
echo "Template not found, available options:"
|
|
||||||
list_available
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "\n### %s\n\n%s\n\n" "$name" "$content" >>"$tmp_file"
|
|
||||||
done
|
|
||||||
|
|
||||||
sed -i -ne "/#### -- TEMPLATES BEGIN -- ####/ {p; r $tmp_file" -e ':a; n; /#### -- TEMPLATES END -- ####/ {p; b}; ba}; p' "$root/.gitignore"
|
|
||||||
|
|
||||||
rm "$tmp_file"
|
|
||||||
|
|
@ -8,12 +8,6 @@ release_mode := "dev"
|
||||||
container_registry := "git.alecodes.page/alecodes"
|
container_registry := "git.alecodes.page/alecodes"
|
||||||
container_image_name := container_registry / bin_name
|
container_image_name := container_registry / bin_name
|
||||||
|
|
||||||
[private]
|
|
||||||
docker-compose +ARGS:
|
|
||||||
docker compose --file .devfiles/docker/docker-compose.dev.yaml --env-file .env --project-name compendium {{ARGS}}
|
|
||||||
|
|
||||||
start-dev-services: (docker-compose "up --remove-orphans")
|
|
||||||
|
|
||||||
migrate: (docker-compose "run dbmate migrate")
|
migrate: (docker-compose "run dbmate migrate")
|
||||||
|
|
||||||
rollback: (docker-compose "run dbmate rollback")
|
rollback: (docker-compose "run dbmate rollback")
|
||||||
|
|
|
||||||
6
cog.toml
6
cog.toml
|
|
@ -19,12 +19,6 @@ post_package_bump_hooks = []
|
||||||
|
|
||||||
[git_hooks]
|
[git_hooks]
|
||||||
|
|
||||||
[git_hooks.pre-commit]
|
|
||||||
path = ".devfiles/hooks/pre-commit.sh"
|
|
||||||
|
|
||||||
[git_hooks.commit-msg]
|
|
||||||
path = ".devfiles/hooks/commit-msg.sh"
|
|
||||||
|
|
||||||
[commit_types]
|
[commit_types]
|
||||||
|
|
||||||
[changelog]
|
[changelog]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue