@@ -71,38 +71,6 @@ services:
7171 - redis_data:/data
7272 restart : always
7373
74- # This service is responsible for ensuring the correct ownership of files
75- # in the shared volumes used by the application (static and workspace).
76- # It ensures that all files inside the `/var/scancodeio/` directory are owned
77- # by the user and group with the UID and GID defined in the environment variables
78- # APP_UID and APP_GID, which default to 1000 if not set.
79- #
80- # The service runs only once (due to "restart: no") and performs a `chown` operation
81- # to change the ownership of the static and workspace directories, ensuring proper
82- # file access rights for the running application containers.
83- #
84- # Volumes mounted:
85- # - static: Ensures the ownership of static files in the /var/scancodeio/static directory
86- # - media: Ensures the ownership of media files in the /var/scancodeio/workspace directory
87- #
88- # Notes: This service can be removed in future ScanCode.io release.
89- chown :
90- image : docker.io/library/alpine:latest
91- restart : " no"
92- command : sh -c "
93- if [ ! -f /var/scancodeio/workspace/.chown_done ]; then
94- chown -R ${APP_UID:-1000}:${APP_GID:-1000} /var/scancodeio/ &&
95- touch /var/scancodeio/workspace/.chown_done;
96- echo 'Chown applied!';
97- else
98- echo 'Chown already applied, skipping...';
99- fi"
100- env_file :
101- - docker.env
102- volumes :
103- - static:/var/scancodeio/static/
104- - workspace:/var/scancodeio/workspace/
105-
10674 web :
10775 build : .
10876 command : sh -c "
@@ -124,8 +92,6 @@ services:
12492 condition : service_healthy
12593 redis :
12694 condition : service_started
127- chown :
128- condition : service_completed_successfully
12995
13096 worker :
13197 build : .
@@ -144,7 +110,6 @@ services:
144110 - redis
145111 - db
146112 - web
147- - chown
148113
149114 nginx :
150115 image : docker.io/library/nginx:alpine
0 commit comments