https://github.com/knightchaser/goanonpicdb
A fully dockerized web application for anonymous image uploading(booru), powered by Golang and MySQL.
https://github.com/knightchaser/goanonpicdb
docker docker-compose go-backend image-uploading web-backend
Last synced: about 1 month ago
JSON representation
A fully dockerized web application for anonymous image uploading(booru), powered by Golang and MySQL.
- Host: GitHub
- URL: https://github.com/knightchaser/goanonpicdb
- Owner: KnightChaser
- Created: 2024-01-22T04:36:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-02T08:07:40.000Z (over 1 year ago)
- Last Synced: 2025-01-28T16:46:50.535Z (3 months ago)
- Topics: docker, docker-compose, go-backend, image-uploading, web-backend
- Language: Go
- Homepage: https://www.docker.com/
- Size: 2.56 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# goAnonPicDB






**goAnonPicDB** is a simple web service that allows users to anonymously upload images. It is built with Go and uses `GORM` as the **ORM (Object-Relational Mapping)** library. The images are stored in a MySQL database. It might be a good example for learning how to organize applications with `docker` and `docker-compose`.
**CI/CD status**: [](https://github.com/KnightChaser/goAnonPicDB/actions/workflows/CICD.yml)
## **Preview**
**User interface (web)**![]()
**Database managing uploaded pictures via filepath (real image data are uploaded to `/static`)**## Feature
* Anonymous image uploading via HTTP communication
* Display of the 6 most recent images (number may be adjusted by user. Go to `main.go`)
* Count of total uploaded images
* Docker support for easy deployment (via `docker-compose.yaml`)## Usage
1. **Clone** the repository:
```bash
git clone https://github.com/KnightChaser/goAnonPicDB.git
cd goAnonPicDB
```2. (optional) Modify `.env` for preconfigured environmental variables (will be applied to `docker-compose.yaml`).
```yaml
MYSQL_ROOT_PASSWORD=root # (not used in this service actually)
MYSQL_DATABASE_NAME=images # The name of database where image filepath is stored
MYSQL_USERNAME=knightchaser # The username of database (actually used)
MYSQL_PASSWORD=goanonpicdb # The password of database (actually used)
```3. Build and run the Docker containers:
```bash
docker-compose up -d
```4. Access the application at [http://localhost:8080](http://localhost:8080) in your web browser. And you'll see the web implementation of `goAnonPicDB`!
## To-Do
- [x] Dockerize applications
- [x] Create `.env` file and manage cross-service environmental variables and constants (Or do the same thing with other methods)
- [X] Complete GitHub CI/CD Integration with GitHub Action for automatic Docker deployment. DockerHub release will be visible at **[`knightchaser/goanonpicdb`](https://hub.docker.com/r/knightchaser/goanonpicdb)**## Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.