-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.local.yml
107 lines (99 loc) · 2.62 KB
/
docker-compose.local.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Base Docker compose for all environments
version: "3.4"
services:
postgres:
image: postgres:15.7
environment:
- PGDATA=/var/lib/postgresql/data/
- POSTGRES_DB=tdrs_test
- POSTGRES_PASSWORD=something_secure
- POSTGRES_PORT=5432
- POSTGRES_USER=tdpuser
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data/:rw
localstack:
image: localstack/localstack:0.13.3
environment:
- SERVICES=s3
- DATA_DIR=/tmp/localstack/data
- AWS_BUCKET=tdp-datafiles-localstack
- AWS_REGION_NAME=us-gov-west-1
- HOSTNAME=localstack
- HOSTNAME_EXTERNAL=localstack
ports:
- "4566:4566"
volumes:
- localstack_data:/tmp/localstack
# Copy in the Localstack setup script to configure any buckets needed
- ../scripts/localstack-setup.sh:/docker-entrypoint-initaws.d/localstack-setup.sh
elastic:
image: elasticsearch:7.17.6
environment:
- discovery.type=single-node
- xpack.security.enabled=false
- cluster.routing.allocation.disk.threshold_enabled=false
- logger.discovery.level=debug
ports:
- 9200:9200
- 9300:9300
volumes:
- elastic_data:/usr/share/elasticsearch/data
web:
restart: always
env_file:
- .env
environment:
- CLAMAV_NEEDED
- AV_SCAN_URL=http://clamav-rest:9000/scan
- DB_HOST=postgres
- DB_NAME=tdrs_test
- DB_PASSWORD=something_secure
- DB_PORT=5432
- DB_USER=tdpuser
- DJANGO_CONFIGURATION=${DJANGO_CONFIGURATION:-Local}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY:-tdp-dev-insecure}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-tdpservice.settings.local}
- LOCALSTACK_HOST=localstack
- DJANGO_SU_NAME
- JWT_CERT_TEST
- JWT_KEY
- USE_LOCALSTACK
- LOGGING_LEVEL
- AMS_CLIENT_ID
- AMS_CLIENT_SECRET
- AMS_CONFIGURATION_ENDPOINT
- REDIS_URI=redis://redis-server:6379
- REDIS_SERVER_LOCAL=TRUE
- SENDGRID_API_KEY
volumes:
- .:/tdpapp
image: tdp
build: .
command: >
bash -c "./wait_for_services.sh &&
./gunicorn_start.sh &&
celery -A tdpservice.settings worker -l info"
ports:
- "5555:5555"
depends_on:
- localstack
- postgres
- redis-server
- elastic
redis-server:
image: "redis:alpine"
command: redis-server /tdpapp/redis.conf
ports:
- "6379:6379"
volumes:
- .:/tdpapp
volumes:
localstack_data:
postgres_data:
elastic_data:
networks:
default:
name: external-net
external: true