File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments