-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-aws.yml
93 lines (86 loc) · 2.56 KB
/
docker-compose-aws.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
# Development deployment using AWS RSTUF Services
version: "3.9"
volumes:
repository-service-tuf-storage:
repository-service-tuf-api-data:
repository-service-tuf-redis-data:
repository-service-tuf-pgsql-data:
services:
postgres:
image: postgres:15.1
ports:
- "5433:5432"
environment:
- POSTGRES_PASSWORD=secret
volumes:
- "repository-service-tuf-pgsql-data:/var/lib/postgresql/data"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
interval: 1s
repository-service-tuf-api:
image: ghcr.io/repository-service-tuf/repository-service-tuf-api:${API_VERSION}
volumes:
- repository-service-tuf-api-data:/data
ports:
- 80:80
environment:
- RSTUF_BROKER_SERVER=redis://redis
- RSTUF_REDIS_SERVER=redis://redis
depends_on:
redis:
condition: service_healthy
redis:
image: redis:4.0
volumes:
- repository-service-tuf-redis-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 1s
localstack:
image: localstack/localstack:2.2
environment:
HOSTNAME: "localstack"
LOCALSTACK_HOST: "localstack"
LS_LOG: "error"
ports:
- "4566:4566"
volumes:
- "./tests/files/aws/init-services.sh:/etc/localstack/init/ready.d/init-services.sh"
repository-service-tuf-worker:
build:
context: .
entrypoint: "bash entrypoint-dev.sh"
environment:
- DATA_DIR=./data
- RSTUF_STORAGE_BACKEND=AWSS3
- RSTUF_AWS_STORAGE_BUCKET=tuf-metadata
- RSTUF_AWS_ACCESS_KEY_ID=access_key
- RSTUF_AWS_SECRET_ACCESS_KEY=secret_key
# region and endpoint_url are required by localstack
- RSTUF_AWS_DEFAULT_REGION=us-east-1
- RSTUF_AWS_ENDPOINT_URL=http://localstack:4566
- RSTUF_ONLINE_KEY_DIR=/var/opt/repository-service-tuf/key_storage
- RSTUF_BROKER_SERVER=redis://redis
- RSTUF_REDIS_SERVER=redis://redis
- RSTUF_DB_SERVER=postgres:secret@postgres:5432
- METADATA_BASE_URL="http://localstack:4566/tuf-metadata/"
volumes:
- ./:/opt/repository-service-tuf-worker:z
- ./tests/files/key_storage/:/var/opt/repository-service-tuf/key_storage
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
localstack:
condition: service_healthy
tty: true
stdin_open: true
rstuf-ft-runner:
image: python:3.10-slim-buster
command: python -V
working_dir: /rstuf-runner
volumes:
- ./:/rstuf-runner