- To view logs of the running containers:
- To attach to the started container (bash)
- Attach to a container when it does not start
- To stop all your containers:
- To delete all images and containers:
- To delete PostgreSQL volumes
- Upgrade Airflow Database
- Create Airflow user
usage:
docker-compose logs {container_name}
example:
docker-compose logs webserver
usage:
docker-compose exec {container_name} bash
example:
docker-compose exec webserver bash
If a container does not start because of teh startup errors, use the following command:
docker-compose run --entrypoint bash webserver
docker-compose down
docker system prune -a
# find volume name
docker volume ls | grep postgre
# delete
docker volume rm airflow-cwl-docker_postgres-db-volume
If you have a problem with login and logs in containers complaining that "relation does not exist" execute this:
docker exec -it scheduler entrypoint.sh airflow db upgrade
docker exec -it webserver entrypoint.sh airflow db upgrade
If you have a problem with login and logs in containers complaining that "No user yet created" execute this:
docker exec -it scheduler entrypoint.sh airflow users create --username $_AIRFLOW_WWW_USER_USERNAME --password $_AIRFLOW_WWW_USER_PASSWORD -r Admin -e [email protected] -f Airflow -l Airflow