https://github.com/johnbedeir/go-survey
https://github.com/johnbedeir/go-survey
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/johnbedeir/go-survey
- Owner: johnbedeir
- Created: 2023-03-21T16:05:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-23T18:51:56.000Z (about 3 years ago)
- Last Synced: 2025-04-06T19:27:56.320Z (about 1 year ago)
- Language: HCL
- Size: 16.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Go-Survey
This application is a simple survey where the go app run on `localhost:8080` and when you send a `POST` request as a `JSON` format it will be added automatically in the `MONGODB` database.
`NOTE:` In the first 2 options make sure you already have `MONGODB` [Installed](https://www.mongodb.com/docs/manual/administration/install-community/) and running on `localhost:27017`
## 1. Build and Run the app locally:
`NOTE:` Install [GoLang](https://go.dev/doc/install) then run the following commands inside the app directory
```
go mod tidy
```
```
go build main.go
```
```
./main
```
## 2. Run the app in a Docker container:
```
docker build -t .
```
`NOTE:` In the following option you don't need `MONGODB` installed or running since it will be running directly from a docker container.
## 3. Run both `GoApp` and `MONGODB` in docker containers:
```
docker-compose up
```
## 4. Deploy application on `Minikube`:
```
chmod +x deploy.sh
deploy.sh
```
### Finally to delete deployment:
```
chmod +x delete.sh
./delete.sh
```