We are starting the project, and it is essential to have a local dev so the developer can run and test the application.
This PR implements the deployments with the following features:
Deployments are entirely based on the official Golang images.
Parameterized by environment variables (app.env)
Handy Makefile statements to handle deployments
Verification
Ensure you have docker, docker-compose, and GO 1.22.0 or higher installed and running on your machine. Look at the environment file variables, set them as needed, and run the following make statements in a terminal:
make app: Builds and runs the Go application into a docker container
Verify the container exists with the docker ps -a command, check for the docker logs, and look for the "Hello HTTP Rest API" message. Currently, you'll see the container status as exit, and it's okay due to missing the HTTP server implementation.
make build: Builds the http-api application binary on the root.
Verify the binary was created with the command ls "project's root path"
make network: creates the virtual networking for the app.
Verify the network exists with the docker network ls command.
make stop: stop the Go application container
make clean: Remove the container and docker images generated by the deployments
Verify the container no longer exists with the following docker ps -a and use the docker image ls command to verify the generated images.
Description
We are starting the project, and it is essential to have a local dev so the developer can run and test the application.
This PR implements the deployments with the following features:
Verification
Ensure you have docker, docker-compose, and GO 1.22.0 or higher installed and running on your machine. Look at the environment file variables, set them as needed, and run the following make statements in a terminal:
make app: Builds and runs the Go application into a docker container Verify the container exists with the
docker ps -a
command, check for the docker logs, and look for the "Hello HTTP Rest API" message. Currently, you'll see the container status as exit, and it's okay due to missing the HTTP server implementation.make build: Builds the http-api application binary on the root. Verify the binary was created with the command
ls "project's root path"
make network: creates the virtual networking for the app. Verify the network exists with the
docker network ls
command.make stop: stop the Go application container
make clean: Remove the container and docker images generated by the deployments Verify the container no longer exists with the following
docker ps -a
and use thedocker image ls
command to verify the generated images.