Skip to content

Creating a sample sub platform environment

Damjan Dimitrioski edited this page May 3, 2021 · 1 revision

To create a new environment

mkdir platform-new
touch platform-new/.env
ln -s docker-compose.base.yml platform-new/docker-compose.yml
touch platform-new/docker-compose.override.yml

Basically we link the original docker base compose and we have new .env file for each platform environment. Inside each .env we can control the inside port and the outside port.

Each override has the example structure:

version: '3'

services:
    backend1:
        # add content here
        volumes:
            - ./data/backend3/config:/config

We can create a data directory for each service an mount/bind few things.

Note: each platform environment will not to be committed to GIT. The platform environments will be created on the dev machine or production.

Environment keys:

  • PORT_BACKEND1 is the outside port

  • PORT_BACKEND1_IN is the inside port

  • BACKEND1_PORT is the listen port for the service

Clone this wiki locally