-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose-develop.yml
More file actions
80 lines (75 loc) · 2.55 KB
/
Copy pathdocker-compose-develop.yml
File metadata and controls
80 lines (75 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Development stack: builds the app image locally from ./Dockerfile and mounts
# the custom RO-Crate profiles into both the flask and worker containers. Use
# this when working on the service itself; use docker-compose.yml to run the
# published image.
services:
flask:
build:
context: .
dockerfile: Dockerfile
ports:
- "5001:5000"
environment:
- FLASK_APP=wsgi.py
- FLASK_ENV=development
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
# Optional object storage. Set STORAGE_ENABLED=true and start the
# "objectstore" profile (docker compose --profile objectstore up).
- STORAGE_ENABLED=${STORAGE_ENABLED:-false}
- S3_ENDPOINT=${S3_ENDPOINT}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_BUCKET=${S3_BUCKET}
- S3_USE_SSL=${S3_USE_SSL:-false}
- EXTRA_PROFILES_PATH=/app/profiles
depends_on:
- redis
# Metadata validation runs synchronously in this process, so the flask
# service needs the custom profiles mounted too (not just the worker).
volumes:
- ./tests/data/rocrate_validator_profiles:/app/profiles:ro
celery_worker:
build:
context: .
dockerfile: Dockerfile
command: celery -A app.celery_worker.celery worker --loglevel=info -E
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/0
# The worker builds its storage client from these, so it needs the full
# S3 config (not just the enabled flag).
- STORAGE_ENABLED=${STORAGE_ENABLED:-false}
- S3_ENDPOINT=${S3_ENDPOINT}
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_BUCKET=${S3_BUCKET}
- S3_USE_SSL=${S3_USE_SSL:-false}
- EXTRA_PROFILES_PATH=/app/profiles
depends_on:
- redis
volumes:
- ./tests/data/rocrate_validator_profiles:/app/profiles:ro
redis:
image: "redis:alpine"
ports:
- "6379:6379"
objectstore:
image: "rustfs/rustfs:latest"
# Local S3-compatible object store (RustFS) for development.
# Started with `docker compose --profile objectstore up`.
profiles:
- objectstore
ports:
- "9000:9000"
- "9001:9001"
environment:
- RUSTFS_ACCESS_KEY=${RUSTFS_ACCESS_KEY}
- RUSTFS_SECRET_KEY=${RUSTFS_SECRET_KEY}
- RUSTFS_VOLUMES=/data
- RUSTFS_ADDRESS=0.0.0.0:9000
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
volumes:
- objectstore_data:/data
volumes:
objectstore_data: