Skip to content

A simple frontend and backend api composed to a docker container.

Notifications You must be signed in to change notification settings

aquelegabes/docker-compose-learning

Repository files navigation

Instructions

Requirements

Setting containers

On the docker-compose.yml VIRTUAL_ENV means what your address should be.

docker compose file



Build the containers using docker-compose build.
Shouldn't have any errors on build.



docker compose build command

Setting /etc/hosts

In order to use reversed proxy you'll need to set the hosts file as shown.
The second IP is just to setup for bridge network on VM.



/etc/hosts file

Running containers

Use docker-compose up to run the containers. docker compose up command

With the containers running and hosts setup you'll should be able to connect to your chosen address. app running

How the application knows how to correctly connect to the backend api?

The docker containers resolve this conflict using an alias on addresses. docker-compose.yml docker app names

Where our application name is the address that is setup when a request is made. application urls

About

A simple frontend and backend api composed to a docker container.

Resources

Stars

Watchers

Forks