-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add explicit (separate) "docker-swarm" and "triton" docker-compose files #9
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
# MySQL designed for container-native deployment on Joyent's Triton platform. | ||
|
||
mysql: | ||
image: autopilotpattern/mysql:latest | ||
mem_limit: 4g | ||
restart: always | ||
env_file: _env | ||
environment: | ||
- CONTAINERBUDDY=file:///etc/containerbuddy.json | ||
- MANTA_PRIVATE_KEY | ||
version: '2' | ||
|
||
# expose for linking, but each container gets a private IP for | ||
# internal use as well | ||
expose: | ||
- 3306 | ||
services: | ||
|
||
# --------------------------------------------------- | ||
# Consul as a service discovery tier | ||
mysql: | ||
image: autopilotpattern/mysql:latest | ||
mem_limit: 4g | ||
restart: always | ||
env_file: _env | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth noting here that |
||
environment: | ||
- CONTAINERBUDDY=file:///etc/containerbuddy.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any particular reason we don't just embed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right to ask. That's what we've started doing since this one. Example: https://github.com/autopilotpattern/couchbase/blob/master/Dockerfile#L12 |
||
- MANTA_PRIVATE_KEY | ||
|
||
consul: | ||
image: progrium/consul:latest | ||
command: -server -bootstrap -ui-dir /ui | ||
restart: always | ||
mem_limit: 128m | ||
ports: | ||
- 8500 | ||
expose: | ||
- 53 | ||
- 8300 | ||
- 8301 | ||
- 8302 | ||
- 8400 | ||
- 8500 | ||
dns: | ||
- 127.0.0.1 | ||
# expose for linking, but each container gets a private IP for | ||
# internal use as well | ||
expose: | ||
- 3306 | ||
|
||
# --------------------------------------------------- | ||
# Consul as a service discovery tier | ||
|
||
consul: | ||
image: progrium/consul:latest | ||
command: -server -bootstrap -ui-dir /ui | ||
restart: always | ||
mem_limit: 128m | ||
ports: | ||
- 8500 | ||
expose: | ||
- 53 | ||
- 8300 | ||
- 8301 | ||
- 8302 | ||
- 8400 | ||
- 8500 | ||
dns: | ||
- 127.0.0.1 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
COMPOSE_PROJECT_NAME=autopilotmysql | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy to drop these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compose automatically loads the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Brand new in 1.7.0 😇 (https://github.com/docker/compose/releases/tag/1.7.0) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very interesting |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '2' | ||
|
||
services: | ||
|
||
mysql: | ||
extends: | ||
file: ../common-compose.yml | ||
service: mysql | ||
|
||
consul: | ||
extends: | ||
file: ../common-compose.yml | ||
service: consul |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
COMPOSE_PROJECT_NAME=autopilotmysql |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '2' | ||
|
||
services: | ||
|
||
mysql: | ||
extends: | ||
file: ../common-compose.yml | ||
service: mysql | ||
network_mode: bridge | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using an explicit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL. Thank you. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤘 |
||
links: | ||
- consul:consul | ||
|
||
consul: | ||
extends: | ||
file: ../common-compose.yml | ||
service: consul | ||
network_mode: bridge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we'd eliminate the
common-compose.yml
entirely. We dropped it in our more recent blueprints because eliminating the use of--link
for Consul meant that the maindocker-compose.yml
could be the common parent. https://github.com/autopilotpattern/couchbase is a good example.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I've started work on fixing up this repo in #14