-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5fc6ef0
commit 7362f3b
Showing
1 changed file
with
49 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,49 @@ | ||
# ccinvoice | ||
A simple invoicing system for Canine Club | ||
# Canine Club Invoicing System | ||
A mobile-first web application I built for my wife's dog walking business. Built with [Go](https://go.dev) and [HTMX](https://htmx.org). | ||
|
||
## 🚀 Deploying | ||
To run the app in a docker container, you'll need to create a `.env` file in the root directory with the following environment variables: | ||
```env | ||
SMTP_HOST=smtp.example.com | ||
SMTP_PORT=587 | ||
[email protected] | ||
SMTP_PASS=P@ssw0rd | ||
FROM_NAME=John Doe | ||
FROM_ADDRESS=4 Privet Drive, Little Whinging, Surrey | ||
FROM_CITY=London | ||
ACCOUNT_NUMBER=12-3456-7890123-45 | ||
BASE_URL=http://invoices.example.com | ||
``` | ||
|
||
I recommend using a docker-compose file to run the app. Here's an example: | ||
|
||
```yaml | ||
version: "3" | ||
services: | ||
invoices: | ||
image: ghcr.io/scottmckendry/ccinvoice:main | ||
container_name: invoices | ||
networks: | ||
- traefik | ||
volumes: | ||
- /etc/localtime:/etc/localtime:ro | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ./db.sqlite3:/app/db.sqlite3 | ||
- ./.env:/app/.env | ||
ports: | ||
3000:3000 | ||
restart: unless-stopped | ||
``` | ||
This will run the app on port 3000. I recommend using [Traefik](https://traefik.io) as a reverse proxy. Take a look at my [setup guide](https://scottmckendry.tech/posts/traefik-setup/) for more information. | ||
> [!WARNING]\ | ||
> Do not expose the app to the internet without a reverse proxy running authentication middleware. The app does not have any authentication built in. | ||
## 🧑💻 Development | ||
To run the app locally, create a `.env` file matching the example above. Then use the docker-compose file in the root of the repository by running `docker compose up`. This will run the app on port 3000. You can then access the app at [http://localhost:3000](http://localhost:3000). | ||
|
||
The project uses [air](https://github.com/cosmtrek/air) for live reloading. To run the app locally without docker, run `air` in the root of the repository. | ||
|
||
## 🤝 Contributing | ||
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. |