You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/24 20:55:14 UTC
[GitHub] [airflow] akihiro-inui opened a new issue #14991: static file not being loaded in web server in docker-compose
akihiro-inui opened a new issue #14991:
URL: https://github.com/apache/airflow/issues/14991
I am having an issue with running `apache/airflow:master-python3.8` with docker-compose.
The log of the webserver says` Please make sure to build the frontend in static/ directory and restart the server` when it is running. Due to static files not being loaded, login and dags are not working.
My docker-compose is based on the official example.
https://github.com/apache/airflow/blob/master/docs/apache-airflow/start/docker-compose.yaml
Login prompt looks like this.

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil closed issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
kaxil closed issue #14991:
URL: https://github.com/apache/airflow/issues/14991
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806267110
Found it . My fault, sorry. Fixed in upcoming #14995
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806253843
Yep. I can confirm this. Looking for a reason.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806268658
Thanks for reporting/confirming @akihiro-inui @uranusjr !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-807380961
> Thank you @potiuk , is this fix going to be released as the same tag apache/airflow:master-python3.8 after your PR is merged?
Should be there in ~ 20 minutes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] akihiro-inui commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
akihiro-inui commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806411325
Thank you @potiuk , is this fix going to be released as the same tag apache/airflow:master-python3.8 after your PR is merged?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] akihiro-inui commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
akihiro-inui commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806201486
Thank you very much. I am posting my docker-compose.yml to replicate the issue.
```
version: '3'
x-airflow-common:
&airflow-common
image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:master-python3.8}
environment:
&airflow-common-env
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: "postgresql+psycopg2://airflow:airflow@postgres/airflow"
AIRFLOW__CELERY__RESULT_BACKEND: "db+postgresql://airflow:airflow@postgres/airflow"
AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
AIRFLOW__CORE__FERNET_KEY: ''
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'
volumes:
- ./src:/opt/airflow/src
- ./src/dags:/opt/airflow/dags
- ./airflow/logs:/opt/airflow/logs
- ./airflow/plugins:/opt/airflow/plugins
user: "${AIRFLOW_UID:-50000}:${AIRFLOW_GID:-50000}"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 5s
retries: 5
restart: always
redis:
image: redis:latest
ports:
- 6379:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 30s
retries: 50
restart: always
airflow-webserver:
<<: *airflow-common
command: webserver
ports:
- 8080:8080
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 10s
timeout: 10s
retries: 5
restart: always
airflow-scheduler:
<<: *airflow-common
command: scheduler
depends_on:
- postgres
restart: always
airflow-worker:
<<: *airflow-common
command: celery worker
depends_on:
- postgres
restart: always
airflow-init:
<<: *airflow-common
command: version
environment:
<<: *airflow-common-env
_AIRFLOW_DB_UPGRADE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
flower:
<<: *airflow-common
command: celery flower
ports:
- 5555:5555
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:5555/"]
interval: 10s
timeout: 10s
retries: 5
restart: always
volumes:
postgres-db-volume:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806267347
This PR also adds protection so that we will not hit it again (checks if the recompiled assets are present in the images during CI check).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806195446
I don't recall changing anything in the Dockerfile . I will try to take a look tomorrow but maybe it is something connected to the new UI changes @bbovenzi ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806185357
Can confirm, this is also a problem when running `breeze start-airflow` on a freshly built image.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #14991: static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806180044
Thanks for opening your first issue here! Be sure to follow the issue template!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] akihiro-inui edited a comment on issue #14991: Static file not being loaded in web server in docker-compose
Posted by GitBox <gi...@apache.org>.
akihiro-inui edited a comment on issue #14991:
URL: https://github.com/apache/airflow/issues/14991#issuecomment-806201486
Thank you very much. I am posting my docker-compose.yml to reproduce the issue.
```
version: '3'
x-airflow-common:
&airflow-common
image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:master-python3.8}
environment:
&airflow-common-env
AIRFLOW__CORE__EXECUTOR: CeleryExecutor
AIRFLOW__CORE__SQL_ALCHEMY_CONN: "postgresql+psycopg2://airflow:airflow@postgres/airflow"
AIRFLOW__CELERY__RESULT_BACKEND: "db+postgresql://airflow:airflow@postgres/airflow"
AIRFLOW__CELERY__BROKER_URL: redis://:@redis:6379/0
AIRFLOW__CORE__FERNET_KEY: ''
AIRFLOW__CORE__DAGS_ARE_PAUSED_AT_CREATION: 'true'
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'
volumes:
- ./src:/opt/airflow/src
- ./src/dags:/opt/airflow/dags
- ./airflow/logs:/opt/airflow/logs
- ./airflow/plugins:/opt/airflow/plugins
user: "${AIRFLOW_UID:-50000}:${AIRFLOW_GID:-50000}"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
services:
postgres:
image: postgres:13
environment:
POSTGRES_USER: airflow
POSTGRES_PASSWORD: airflow
POSTGRES_DB: airflow
volumes:
- postgres-db-volume:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "airflow"]
interval: 5s
retries: 5
restart: always
redis:
image: redis:latest
ports:
- 6379:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 30s
retries: 50
restart: always
airflow-webserver:
<<: *airflow-common
command: webserver
ports:
- 8080:8080
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8080/health"]
interval: 10s
timeout: 10s
retries: 5
restart: always
airflow-scheduler:
<<: *airflow-common
command: scheduler
depends_on:
- postgres
restart: always
airflow-worker:
<<: *airflow-common
command: celery worker
depends_on:
- postgres
restart: always
airflow-init:
<<: *airflow-common
command: version
environment:
<<: *airflow-common-env
_AIRFLOW_DB_UPGRADE: 'true'
_AIRFLOW_WWW_USER_CREATE: 'true'
_AIRFLOW_WWW_USER_USERNAME: ${_AIRFLOW_WWW_USER_USERNAME:-airflow}
_AIRFLOW_WWW_USER_PASSWORD: ${_AIRFLOW_WWW_USER_PASSWORD:-airflow}
flower:
<<: *airflow-common
command: celery flower
ports:
- 5555:5555
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:5555/"]
interval: 10s
timeout: 10s
retries: 5
restart: always
volumes:
postgres-db-volume:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org