From Grider's Docker & Kubernetes course on Udemy.
updated 6-12-2020
Due to a recent update in the official Postgres image hosted on the DockerHub we need to make a change to our environment variables.
Add the following to your docker-compose.yml file in the postgres service:
postgres:
image: 'postgres:latest'
environment:
- POSTGRES_PASSWORD=postgres_password
docker-compose down && docker-compose up --build
Please note, all of these changes are reflected in the downloadable checkpoint zip files.
In the next lecture, we will be adding a client and worker service. There are two required configuration updates that need to be made:
- When adding the "Client" service, be sure to include the
stdin_open: true
configuration:
client:
stdin_open: true
build:
dockerfile: Dockerfile.dev
context: ./client
volumes:
- /app/node_modules
- ./client:/app
Otherwise, you will get a "React App exited with Code 0" error in your terminal when we attempt to start up the application.
- When adding the "Worker" service, include the Redis host and port as environment variables:
worker:
build:
dockerfile: Dockerfile.dev
context: ./worker
volumes:
- /app/node_modules
- ./worker:/app
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
Otherwise, you will get a "Calculated Nothing Yet" error message.