Time Capsule Memories is a personal pet-project designed to store and send your memories into the future. Users can create “time capsules” containing messages and photos that will be delivered to the recipients of their choice at a specified date and time.
-
Copy the example environment file:
cp example.env .env
-
Build the Docker containers:
docker-compose build
-
Start the app:
docker-compose up
- frontend - http://frontend.localhost
- backend - http://backend.localhost/swagger/
- minio - http://minio.localhost
- pgadmin - http://pgadmin.localhost
- MailHog - http://localhost:8025
- traefik - http://localhost:8080/dashboard/#/
This project uses the Goose library to manage database migrations.
-
Install the CLI:
go install github.com/pressly/goose/v3/cmd/goose@latest
-
(Optional) Install the library if you plan to use Goose in your Go application:
go get -u github.com/pressly/goose/v3
-
Initialize the migrations directory:
mkdir -p migrations
-
Create a new migration:
goose create create_capsules_table sql -dir ./migrations
This will generate a file like
20241124120000_create_capsules_table.sql
in themigrations
folder. -
Add SQL to the migration file
-
Apply all pending migrations:
make migrate_up
-
Rollback the last migration:
make migrate_down