feat: add basic project layout and migration config

This commit is contained in:
Alexander Navarro 2025-02-05 16:06:48 -03:00
parent d9962769ad
commit f937122a2a
5 changed files with 37 additions and 1 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
# Allow to presever folder structure in excluded folers, should be the last rule
!**/.gitkeep
.env

View file

@ -1,5 +1,13 @@
# Repo management tasks
mod repo ".devfiles/justfile"
[private]
[working-directory: 'docker']
compose-exec +ARGS:
docker compose exec {{ARGS}}
[working-directory: 'docker']
dev:
@echo "Edit the .justfile to setup the dev task!"
docker compose up --watch
dbmate +ARGS: (compose-exec "index dbmate" ARGS)

7
docker/Dockerfile Normal file
View file

@ -0,0 +1,7 @@
# FROM ghcr.io/linuxcontainers/debian-slim:latest
FROM lovasoa/sqlpage
COPY --from=ghcr.io/amacneil/dbmate /usr/local/bin/dbmate /usr/local/bin/dbmate
WORKDIR /app

View file

@ -0,0 +1,15 @@
services:
index:
image: alecodes/index:latest
pull_policy: build
user: 1000:1000
build:
context: ..
dockerfile: ./docker/Dockerfile
env_file: ../.env
volumes:
- ../src:/app
db:
image: postgres:17
env_file: ../.env

View file

@ -0,0 +1,5 @@
-- migrate:up
-- migrate:down