Deployment
Docker with Server
Local, API/Frontend
One approach to running this is to have the following docker-compose.yml locally
version: "3.5"
services:
frontend:
image: rictuar/sampleingester-frontend
container_name: front_end
ports:
- 8050:8050
networks:
my_network:
aliases:
- frontend_alias
restart: on-failure
api:
image: rictuar/sampleingester-api
container_name: api
ports:
- 4999:4999
networks:
my_network:
aliases:
- api_alias
restart: on-failure
networks:
my_network:
Using the command
sudo docker compose up
This can be accessed on a browser at http://127.0.0.1:8050/
AWS, API/Frontend
An easy way to make this code accessible to the internet is to deploy it using AWS beanstalk, where the only change to the .yml file is the binding of 8050 to port 80
version: "3.5"
services:
frontend:
image: rictuar/sampleingester-frontend
container_name: front_end
ports:
- 80:8050
networks:
my_network:
aliases:
- frontend_alias
restart: on-failure
api:
image: rictuar/sampleingester-api
container_name: api
ports:
- 4999:4999
networks:
my_network:
aliases:
- api_alias
restart: on-failure
networks:
my_network:
The API can be accessed directly if a listener/process pair is created, e.g.
Images
The Docker images are available directly at https://hub.docker.com/r/rictuar/sampleingester-frontend and https://hub.docker.com/r/rictuar/sampleingester-api