forked from City-of-Helsinki/structured-log-transfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (72 loc) · 2.4 KB
/
docker-compose.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
version: "3.9"
services:
structured-log-transfer-postgres:
image: postgres:latest
command: ["postgres", "-c", "log_statement=all"]
ports:
- "5041:5432"
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: databasename
container_name: structured-log-transfer-db
elasticsearch-for-structured-log-transfer-test:
build:
context: ./localtest
dockerfile: Dockerfile-elastic
environment:
discovery.type: single-node
network.host: 0.0.0.0
volumes:
- ./localtest/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- "9200:9200"
container_name: elasticinstance
structured-log-transfer-test-1:
build:
context: .
dockerfile: Dockerfile
environment:
ELASTICSEARCH_HOST: "host.docker.internal"
ELASTICSEARCH_PORT: "9200"
ELASTICSEARCH_USERNAME:
ELASTICSEARCH_PASSWORD:
ELASTICSEARCH_SCHEME: "http"
DATABASE_URL: "postgres://user:password@structured-log-transfer-postgres/databasename"
DJANGO_SETTINGS_MODULE: "structuredlogtransfer.settings"
AUDIT_LOGGER_TYPE: "DJANGO_AUDITLOG" # enables testing for django_auditlog
depends_on:
- structured-log-transfer-postgres
- elasticsearch-for-structured-log-transfer-test
volumes:
- ./localtest/entrypoint_test.sh:/app/entrypoint_test.sh
profiles:
- test-1
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: /app/entrypoint_test.sh
container_name: structured-log-transfer-test-1
structured-log-transfer-test-2:
build:
context: .
dockerfile: Dockerfile
environment:
ELASTICSEARCH_HOST: "host.docker.internal:9200"
ELASTICSEARCH_SCHEME: "http"
DATABASE_URL: "postgres://user:password@structured-log-transfer-postgres/databasename"
DJANGO_SETTINGS_MODULE: "structuredlogtransfer.settings"
AUDIT_LOGGER_TYPE: "DJANGO_AUDITLOG" # enables testing for django_auditlog
depends_on:
- structured-log-transfer-postgres
- elasticsearch-for-structured-log-transfer-test
volumes:
- ./localtest/entrypoint_test.sh:/app/entrypoint_test.sh
profiles:
- test-2
extra_hosts:
- "host.docker.internal:host-gateway"
entrypoint: /app/entrypoint_test.sh
container_name: structured-log-transfer-test-2
networks:
default:
name: structuredlogtestnet