___ ___ ___
| .'| . | . |
|__,| _| _|
|_| |_| simple web-app
Built with Echo and using PostgreSQL for data storage.
Structure
The following is a summary of files and directories within this project structure:
.
|-- .env # Provides enviroment variables for docker-compose
|-- LICENSE # Contains the terms and conditions
|-- Makefile # Directives used to build and manage the project
|-- README.md # Provides information about the contents of the repo
|-- Dockerfile # Dockerfile of the web application (golang:1.18)
|-- go.mod # Dependencies stuff
|-- go.sum # Dependencies stuff
|-- main.go # Main source code file for the web application
`-- docker-compose.yml # Directives used to build and manage the containers
Deploy
The project can be easily deployed locally using docker-compose and
make:
% make up
# http server started on [::]:1323
To stop the web application, run the following command:
% make down
Config
You can customize the deployment of the web application by modifying the values in the .env
file. This file
contains environment variables that are passed to the Docker containers when they are started.
Testing
To ensure your web application is working correctly, use tools like curl
to access the root route, and check
that the response ('DB pong') is as expected:
% curl -X GET http://localhost:1323
Or request healthchecks logs to check the web application's status:
# requires jq utility
% make test