So I’m trying to connect two containers in both ways, one of them is a socket server with chat inside, so links or depends_on won’t work, I need the networks feature of docker compose.
The docker-compose file I’m using is:
version: '2'
services:
socket_server:
build: ./socket_server
privileged: true
ports:
- "3333:3333"
networks:
main:
aliases:
- socket_server
ruby_test:
build: ./ruby_test
privileged: true
expose:
- "3000"
networks:
main:
aliases:
- ruby_test
nginx:
build: ./nginx
depends_on:
- ruby_test
ports:
- "80:80"
networks:
main: {}
_(I had to use the {} because it would throw the error: _
[Error] Could not parse compose file
[Error] data/networks/main should be object
[Error] Not deploying release.
)
If I leave the ruby and nginx only it build perfect. The only thing I need is to add a socket server container that will communicate bidirectionally with the rails container.
Also, I’m not even sure if the networks feature is supported by resin yet.
Any ideas, suggestions, corrections are welcome.