Skip to content

Commit 6a43079

Browse files
committed
Update README with instructions for building Docker image
1 parent 80d0d1a commit 6a43079

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,40 @@ To setup deployment to Heroku, please configure this custom buildpack
8383

8484
heroku buildpacks:set https://github.com/mfine/heroku-buildpack-stack
8585

86+
# Building and running a Docker Image
87+
88+
There is a Makefile with tasks to build a docker image using docker-compose.
89+
90+
make docker-build
91+
make image
92+
93+
To test the built Docker image here is an example `docker-compose.yml` file:
94+
95+
version: '3'
96+
services:
97+
webserver-realworld:
98+
container_name: webserver.realworld
99+
image: 'haskell-scotty-realworld-example-app:latest'
100+
links:
101+
- postgres-realworld
102+
restart: always
103+
ports:
104+
- "3001:3001"
105+
environment:
106+
- PORT=3001
107+
- DATABASE_URL=postgresql://postgres.realworld/realworld
108+
109+
postgres-realworld:
110+
container_name: postgres.realworld
111+
image: "postgres:10.5"
112+
ports:
113+
- "5432:5432"
114+
environment:
115+
- POSTGRES_DB=realworld
116+
- POSTGRES_USER=root
117+
118+
Simply put the above in a file, then run `docker-compose up -d`. The webserver will be accessible at localhost on port 3001.
119+
86120
# Misc
87121

88-
Logo image - credits to @EricSimmon
122+
Logo image - credits to @EricSimmon

0 commit comments

Comments
 (0)