forked from mbentley/docker-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
34 additions
and
1,565 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
demo/demo | ||
demo_pq/demo | ||
*.swp |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
app: | ||
build: demo_pq | ||
entrypoint: /bin/bash | ||
command: -c "sleep 5 && go-wrapper run" # sleep because the postgres container isn't ready on first start | ||
environment: | ||
- "TITLE=Docker Demo" | ||
- "DB_USER=demo" | ||
- "DB_PASS=demo" | ||
- "DB_NAME=demo" | ||
- "DB_SSL_MODE=disable" | ||
links: | ||
- "db:db" | ||
ports: | ||
- 8080:8080 | ||
expose: | ||
- 8080 | ||
|
||
db: | ||
image: postgres:latest | ||
environment: | ||
- "POSTGRES_USER=demo" | ||
- "POSTGRES_PASSWORD=demo" | ||
expose: | ||
- 5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
# Docker Demo Application | ||
Original Author: Evan Hazlett (https://github.com/ehazlett/docker-demo) | ||
|
||
This is a Go demo application used for demonstrating Docker. | ||
|
||
# Demo | ||
The `demo` directory contains the demo application. | ||
The `demo_pq` directory contains the demo application. | ||
|
||
## Requirements | ||
|
||
## Environment Variables | ||
- Install Docker (https://docs.docker.com/installation/) | ||
|
||
* `TITLE`: sets title in demo app | ||
- Install Docker Compose (https://docs.docker.com/compose/) | ||
|
||
## Build | ||
|
||
`docker build -t docker-demo .` | ||
- `docker-compose build` | ||
|
||
## Run | ||
|
||
`docker run -P --rm docker-demo` | ||
- `docker-compose up` |