A simple web app to track monthly expenses.
Requirements:
makedocker-compose
- Create a
.envfile with the following contents:
APP_PORT=
DB_PORT=
DB_USER=
DB_PASSWORD=Any variables you set in .env will be set in the docker environment, so you can set the timezone with TZ, for example.
- Run
make start. This will build and run 5 docker containers:db: The postgresql database, accessible locally on portDB_PORT.server: The main go webserver. Automatically reloads when app code is changed.proxy: A proxy for the web app that automatically reload the browser when changes are made to.templfiles. This container exposes the app on portAPP_PORT.tailwind: Rebuilds the main css file when changes are made and sends a reload event toproxy.sqlc: Regenerates the sqlc files when changes are made toqueries/*.sql.
- Run
make migrateto set up the database. - Visit
http://localhost:<APP_PORT>in your web browser.