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.
Merge pull request mbentley#3 from mbentley/demo-updates
Demo updates to work with new v2 compose format
- Loading branch information
Showing
20 changed files
with
115 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,48 @@ | ||
version: "2" | ||
|
||
services: | ||
app: | ||
image: ${DTR_URL}/demo/docker-demo:${TAG} | ||
restart: always | ||
entrypoint: /bin/bash | ||
command: -c "sleep 5 && go-wrapper run" # sleep because the postgres container isn't ready on first start | ||
environment: | ||
- "constraint:node!=*-master" | ||
- "constraint:provider==${PROVIDER}" | ||
- "TITLE=Docker Demo-${ENVIRONMENT}" | ||
- "DB_USER=${DB_USER}" | ||
- "DB_PASS=${DB_PASS}" | ||
- "DB_NAME=${DB_NAME}" | ||
- "DB_SSL_MODE=disable" | ||
- "DB_PORT_5432_TCP_ADDR=db" | ||
- "DB_PORT_5432_TCP_PORT=5432" | ||
- "INTERLOCK_DATA={\"hostname\":\"docker-${ENVIRONMENT}\",\"domain\":\"${DOMAIN_NAME}\"}" | ||
networks: | ||
- docker-demo | ||
ports: | ||
- "8080" | ||
expose: | ||
- "8080" | ||
db: | ||
image: postgres:latest | ||
restart: always | ||
environment: | ||
- "constraint:node==*master" | ||
- "POSTGRES_USER=${DB_USER}" | ||
- "POSTGRES_PASSWORD=${DB_PASS}" | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
networks: | ||
- docker-demo | ||
expose: | ||
- "5432" | ||
ports: | ||
- "${POSTGRES_PORT}:5432" | ||
|
||
volumes: | ||
postgres-data: | ||
driver: local | ||
|
||
networks: | ||
docker-demo: | ||
driver: overlay |
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,34 @@ | ||
version: "2" | ||
|
||
services: | ||
app: | ||
image: ${DTR_URL}/demo/docker-demo:${TAG} | ||
entrypoint: /bin/bash | ||
command: -c "sleep 5 && go-wrapper run" # sleep because the postgres container isn't ready on first start | ||
environment: | ||
- "TITLE=${TITLE}" | ||
- "DB_USER=${DB_USER}" | ||
- "DB_PASS=${DB_PASS}" | ||
- "DB_NAME=${DB_NAME}" | ||
- "DB_SSL_MODE=disable" | ||
links: | ||
- "db:db" | ||
network_mode: "bridge" | ||
ports: | ||
- "8080" | ||
expose: | ||
- "8080" | ||
db: | ||
image: postgres:latest | ||
environment: | ||
- "POSTGRES_USER=${DB_USER}" | ||
- "POSTGRES_PASSWORD=${DB_PASS}" | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
network_mode: "bridge" | ||
expose: | ||
- "5432" | ||
|
||
volumes: | ||
postgres-data: | ||
driver: local |
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,24 +1,34 @@ | ||
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 | ||
version: "2" | ||
|
||
db: | ||
image: postgres:latest | ||
environment: | ||
- "POSTGRES_USER=demo" | ||
- "POSTGRES_PASSWORD=demo" | ||
expose: | ||
- 5432 | ||
services: | ||
app: | ||
build: . | ||
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" | ||
network_mode: "bridge" | ||
ports: | ||
- "8080:8080" | ||
expose: | ||
- "8080" | ||
db: | ||
image: postgres:latest | ||
environment: | ||
- "POSTGRES_USER=demo" | ||
- "POSTGRES_PASSWORD=demo" | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
network_mode: "bridge" | ||
expose: | ||
- "5432" | ||
|
||
volumes: | ||
postgres-data: | ||
driver: local |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.