Skip to content

Commit 2b5b4b3

Browse files
kwereyraphink
authored andcommitted
Remove deprecated links, use compose default network (camptocamp#46)
1 parent 1a07a70 commit 2b5b4b3

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

README.md

+25-10
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,35 @@ requires:
7979

8080
## Use with Docker
8181

82+
Either use the included docker-compose file, or run two containers from the commandline:
83+
the app itself and a PostgreSQL database for it to store information in.
84+
8285
```shell
83-
$ docker run -d -p 8080:8080 \
84-
-e AWS_REGION=<AWS_DEFAULT_REGION> \
85-
-e AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> \
86-
-e AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> \
87-
-e AWS_BUCKET=<terraform-bucket> \
88-
-e AWS_DYNAMODB_TABLE=<terraform-locks-table> \
89-
-e DB_PASSWORD="mygreatpasswd" \
90-
--link postgres:db \
91-
camptocamp/terraboard:latest
86+
# Set AWS credentials as environment variables:
87+
export AWS_ACCESS_KEY_ID=<access_key>
88+
export AWS_SECRET_ACCESS_KEY=<access_secret>
89+
# Spin up the two containers and a network for them to communciate on:
90+
docker network create terranet
91+
docker run --name db \
92+
-e POSTGRES_USER=gorm \
93+
-e POSTGRES_DB=gorm \
94+
-e POSTGRES_PASSWORD="<mypassword>" \
95+
--net terranet \
96+
--restart=always postgres -d
97+
docker run -p 8080:8080 \
98+
-e AWS_REGION="<region>" \
99+
-e AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}" \
100+
-e AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" \
101+
-e AWS_BUCKET="<bucket>" \
102+
-e AWS_DYNAMODB_TABLE="<table>" \
103+
-e DB_PASSWORD="<mypassword>" \
104+
--net terranet \
105+
camptocamp/terraboard:latest
92106
```
93107

94-
and point your browser to http://localhost:8080
108+
Then point your browser to http://localhost:8080.
95109

110+
To use the included compose file, you will need to configure an [OAuth application](https://developer.github.com/apps/building-oauth-apps/).
96111

97112
## Use with Rancher
98113

docker-compose.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ services:
1818
AWS_KEY_PREFIX: ${AWS_KEY_PREFIX}
1919
TERRABOARD_LOG_LEVEL: ${TERRABOARD_LOG_LEVEL}
2020
TERRABOARD_LOGOUT_URL: /oauth2/sign_in
21-
links:
21+
depends_on:
2222
- "db"
2323
volumes:
2424
- ./static:/static:ro
@@ -38,8 +38,6 @@ services:
3838
OAUTH2_PROXY_COOKIE_SECRET: ${OAUTH_COOKIE_SECRET}
3939
ports:
4040
- 80:80
41-
links:
42-
- terraboard:terraboard
4341

4442
db:
4543
image: postgres:9.5
@@ -52,4 +50,3 @@ services:
5250

5351
volumes:
5452
tb-data: {}
55-

0 commit comments

Comments
 (0)