Sign inSign up

fabioberger/dockerize-tutorial

By fabioberger

•Updated almost 11 years ago

Image
0

380

fabioberger/dockerize-tutorial repository overview

⁠Example Negroni Golang + Postgres App For Dockerize Tutorial

This repo contains the accompanying demo app for the How To Dockerize Golang Webapp With Postgres DB⁠ tutorial at fabioberger.com⁠.

⁠Set Up Postgres Database:

Run these commands from psql to set up the app's postgres user and db:

CREATE USER app;
CREATE DATABASE testapp;
GRANT ALL PRIVILEGES ON DATABASE testapp TO app;
⁠Install and run locally:

Install:

go get github.com/fabioberger/dockerize-tutorial

Start Server:

go run main.go
⁠Install and run in a docker container:

Setup a Postgres Docker Container as described in the tutorial. Then run these two commands:

docker pull fabioberger/dockerize-tutorial

docker run -d -p 8080:4000 --name tutapp --link dbtest:postgres fabioberger/dockerize-tutorial

Tag summary

Content type

Image

Digest

sha256:a09f34df2…

Size

182.6 MB

Last updated

almost 11 years ago

docker pull fabioberger/dockerize-tutorial