11name : scancodeio
2+
3+ x-description : " Full ScanCode.io stack: all services, local image build"
4+
25services :
36 db :
4- image : docker.io/library/postgres:17.9
7+ image : docker.io/library/postgres:17.10
58 env_file :
69 - docker.env
710 volumes :
811 - db_data:/var/lib/postgresql/data/
912 shm_size : " 1gb"
1013 restart : always
1114 healthcheck :
12- test : [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
15+ test : ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
1316 interval : 10s
1417 timeout : 5s
1518 retries : 5
1619
1720 redis :
18- image : docker.io/library/redis:8.6 -alpine
21+ image : docker.io/library/redis:8.8.0 -alpine
1922 # Enable redis data persistence using the "Append Only File" with the
2023 # default policy of fsync every second. See https://redis.io/topics/persistence
21- command : redis-server --appendonly yes
24+ command : redis-server --appendonly yes --loglevel warning
2225 volumes :
2326 - redis_data:/data
2427 restart : always
28+ healthcheck :
29+ test : ["CMD", "redis-cli", "ping"]
30+ interval : 10s
31+ timeout : 5s
32+ retries : 5
2533
2634 web :
2735 build : .
2836 command : sh -c "
2937 ./manage.py migrate &&
3038 ./manage.py collectstatic --no-input --verbosity 0 --clear &&
3139 gunicorn scancodeio.wsgi:application --bind :8000 --timeout 600 \
32- --workers 8 --worker-tmp-dir /dev/shm ${GUNICORN_RELOAD_FLAG:-} "
40+ --workers ${GUNICORN_WORKERS:-8} --worker-tmp-dir /dev/shm"
3341 env_file :
3442 - docker.env
3543 expose :
@@ -39,11 +47,12 @@ services:
3947 - /etc/scancodeio/:/etc/scancodeio/
4048 - workspace:/var/scancodeio/workspace/
4149 - static:/var/scancodeio/static/
50+ restart : always
4251 depends_on :
4352 db :
4453 condition : service_healthy
4554 redis :
46- condition : service_started
55+ condition : service_healthy
4756
4857 worker :
4958 build : .
@@ -58,13 +67,17 @@ services:
5867 - .env:/opt/scancodeio/.env
5968 - /etc/scancodeio/:/etc/scancodeio/
6069 - workspace:/var/scancodeio/workspace/
70+ restart : always
6171 depends_on :
62- - redis
63- - db
64- - web
72+ db :
73+ condition : service_healthy
74+ redis :
75+ condition : service_healthy
76+ web :
77+ condition : service_started
6578
6679 nginx :
67- image : docker.io/library/nginx:1.29 -alpine
80+ image : docker.io/library/nginx:1.31.2 -alpine
6881 ports :
6982 - " ${NGINX_PUBLISHED_HTTP_PORT:-80}:80"
7083 - " ${NGINX_PUBLISHED_HTTPS_PORT:-443}:443"
@@ -73,11 +86,12 @@ services:
7386 - static:/var/scancodeio/static/
7487 - webroot:/var/www/html/
7588 depends_on :
76- - web
89+ web :
90+ condition : service_started
7791 restart : always
7892
7993 clamav :
80- image : docker.io/clamav/clamav:1.5_base
94+ image : docker.io/clamav/clamav:1.5.2_base
8195 volumes :
8296 - clamav_data:/var/lib/clamav
8397 - workspace:/var/scancodeio/workspace/
0 commit comments