Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Goauth:
image: go-auth
ports:
- "9000:9000"
stdin_open: true
links:
- Database:db
command:
- "--db-host"
- "db"
tty: true
Database:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: messenger
MYSQL_USER: messenger
MYSQL_PASSWORD: messenger
expose:
- "3306"
stdin_open: true
tty: true
Goauth1:
image: go-auth
ports:
- "9000:9000"
stdin_open: true
links:
- Database:db
command:
- "--db-host"
- "db"
tty: true
Database1:
image: mysql
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: messenger
MYSQL_USER: messenger
MYSQL_PASSWORD: messenger
expose:
- "3306"
stdin_open: true
tty: true
@dhesson

This comment has been minimized.

Copy link

@dhesson dhesson commented Apr 16, 2016

I haven't used compose much, but shouldn't Goauth1 link to Database1:db? Also, I'm reading your CI/CD eBook. Great stuff.

@morsoinferno

This comment has been minimized.

Copy link

@morsoinferno morsoinferno commented Sep 6, 2016

and Goauth1 should redirect port 9001 to 9000, if not it will be conflict with Goauth

@riker09

This comment has been minimized.

Copy link

@riker09 riker09 commented Sep 30, 2016

You are both right. It even states this in the related blog post.

The only change is that in Goauth1 we need to change the ports entry from 9000:9000 to 9001:9000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.