DO NOT COMMIT/PUSH THESE CHANGES UNLESS TOLD OTHERWISE
- Open
secrets.yml
inmykotis
andshowcase-admin
mykotis secrets.yml
mykotis_api_key: '<random 10-20 digit key of your choosing>'
showcase_admin_hmac_key: '<hmac key from showcase-admin>'
showcase-admin secrets.yml
hmac_key: '<random 10-20 digit key of your choosing>'
mykotis_api_key: '<api key from mykotis>'
- Open the
docker-compose.yml
file inshowcase-admin
and make the following changes to create a network
version: "3.8"
services:
app:
build:
...
depends_on:
...
ports:
...
networks:
- <enter the name of the network to be created (ex. showcase_network)>
volumes:
...
database:
image:
volumes:
...
networks:
- <network name entered above>
redis:
image:
networks:
- <name of network entered above>
volumes:
db_data:
node_modules:
bundle_path:
networks:
<name of network entered above>:
- Open a
terminal
window outside ofVSCode
and rundocker network ls
and find the name of the network that is created- By default the name of your new network is
<project_name>_<network_name_from_compose_file>
- example:
showcase-admin_showcase_network
- example:
- By default the name of your new network is
- Open the
docker-compose.yml
file inmykotis
and make the following adjustments to connect this container to the new network
version: "3.8"
services:
app:
build:
...
...
depends_on:
...
ports:
...
networks:
- <name of the network created (ex. showcase-admin_showcase_network)>
volumes:
...
...
...
env_file:
environment:
...
...
database:
image: ...
volumes:
...
networks:
- <name of network created>
environment:
...
volumes:
db_data:
node_modules:
bundle_path:
networks:
<name of network created>:
external: true
- In the
terminal
outside ofVSCode
rundocker network inspect <network name>
to verify that your containers are present within the network. - In the
terminal
outside ofVSCode
rundocker ps
to get a list of the runnint containers on your machine, save the names of the following containers in a note for later use.- You will need the container names of
mykotis-app
anddatabase
- Example:
mykotis_app_1
/mykotis_database_1
- Example:
- You will also need the names of
showcase-admin-app
anddatabase
- You will need the container names of
- Open your
development.rb
file withinmykotis
andshowcase-admin
- In
mykotis
make the following changes- Comment out
config.kotis_api_uri = "http://localhost:3000/api"
- Add a new line
config.kotis_api_uri = "http://app:3000/api"
- Add a new line
config.hosts = ["app", "<my kotis container name>", "localhost"]
- Comment out
- In
showcase-admin
make the following changes- Add a new line
config.hosts = ["app", "<showcase-admin container name>", "localhost"]
- Add a new line
- In
- Open
database.yml
withinmykotis
andshowcase-admin
- In
mykotis
make the following changes- Comment out
host: <%= ENV['DATABASE_HOST'] || 'localhost' %>
- Add a new line `host: <%= ' || 'localhost' %>
- Comment out
- In
showcase-admin
make the following changes- Comment out
host: <%= ENV['DATABASE_HOST'] || 'localhost' %>
- Add a new line
host: <%= <'showcase-admin database container name> || 'localhost' %>
- Comment out
- In