Containerized server written in GOLang
142
docker run -e MYSQL_HOST=localhost -e MYSQL_PASS=12345 -e MYSQL_PORT=3306 -e MYSQL_USER=omar omarmokhtar99/go-docker-app
This program is very simple, it connects to a MySQL database based on the following env vars:
MYSQL_HOSTMYSQL_USERMYSQL_PASSMYSQL_PORTAnd exposes itself on port 9090:
/healthcheck it returns an OK message,GET it returns all recorded rows.POST it creates a new row.PATCH it updates the creation date of the row with the same ID as the one specified in query parameter idContent type
Image
Digest
sha256:3138ea9ce…
Size
6.9 MB
Last updated
over 3 years ago
docker pull omarmokhtar99/go-docker-app