Skip to content

Commit c04effc

Browse files
c-wauvipy
authored andcommitted
Fix docker-compose start error (celery#4691)
Running docker-compose on a clean checkout currently fails with a validation error that `services.celery.build.args` contains null. Referencing the `CELERY_USER` environment variable defined in `.env` does not fix this since environment variables are only applied at container run-time, not build-time. To avoid potential confusion due to this, it's easiest to just hard-code the `CELERY_USER` variable in the docker-compose file.
1 parent c2cfc87 commit c04effc

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

docker/.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ RUN apt-get update && apt-get install -y \
2323
# unrelated elements, grouping them together makes the Dockerfile read better.
2424
ENV PROVISIONING /provisioning
2525

26-
# This is provisioned from .env
2726
ARG CELERY_USER=developer
2827

2928
# Check for mandatory build arguments

docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
context: ..
77
dockerfile: docker/Dockerfile
88
args:
9-
CELERY_USER:
9+
CELERY_USER: developer
1010
environment:
1111
TEST_BROKER: pyamqp://rabbit:5672
1212
TEST_BACKEND: redis://redis
@@ -16,7 +16,7 @@ services:
1616
WORKER_LOGLEVEL: DEBUG
1717
tty: true
1818
volumes:
19-
- ../celery:/home/$CELERY_USER/celery
19+
- ../celery:/home/developer/celery
2020
# Because pytest fails when it encounters files from alternative python compilations,
2121
# __pycache__ and pyc files, PYTHONDONTWRITEBYTECODE must be
2222
# set on the host as well or py.test will throw configuration errors.

0 commit comments

Comments
 (0)