-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathdocker-compose.yml
110 lines (103 loc) · 2.59 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
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
108
109
110
version: "3.2"
volumes:
minio:
postgres:
driver: local
secrets:
service-account-key:
file: ./service_account_key.json
services:
minio:
image: minio/minio
volumes:
- minio:/data
ports:
- "9000:9000"
- "9001:9001"
env_file:
- .env
environment:
MINIO_ROOT_USER: minio
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
createbucket:
image: minio/mc
depends_on:
- minio
env_file:
- .env
entrypoint: >
/bin/sh -c "
sleep 5;
/usr/bin/mc config host add myminio http://minio:9000 minio ${MINIO_ROOT_PASSWORD};
/usr/bin/mc mb myminio/${S3_BUCKET_NAME};
/usr/bin/mc anonymous set public myminio/${S3_BUCKET_NAME};
exit 0;
"
postgres:
restart: always
image: postgres:latest
environment:
POSTGRES_USER: openoversight
POSTGRES_PASSWORD: terriblepassword
POSTGRES_DB: openoversight-dev
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
web:
restart: always
build:
context: .
dockerfile: dockerfiles/web/Dockerfile-dev
depends_on:
- postgres
- minio
env_file:
- .env
environment:
APPROVE_REGISTRATIONS: "${APPROVE_REGISTRATIONS}"
ENV: "development"
FLASK_APP: OpenOversight.app
FLASK_DEBUG: 1
OO_HELP_EMAIL: "[email protected]"
OO_SERVICE_EMAIL: "[email protected]"
# Update with your application's respective Olson-style timezone:
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#list
TIMEZONE: "America/Chicago"
volumes:
- ./OpenOversight/:/usr/src/app/OpenOversight/:z
secrets:
- source: service-account-key
target: /usr/src/app/service_account_key.json
user: "${UID:?Docker-compose needs UID set to the current user id number. Try 'export UID' and run docker compose again}"
links:
- postgres:postgres
expose:
- "3000"
ports:
- "3000:3000"
web-test:
restart: always
build:
context: .
args:
- MAKE_PYTHON_VERSION
dockerfile: dockerfiles/web/Dockerfile-test
depends_on:
- createbucket
env_file:
- .env
environment:
ENV: "testing"
FLASK_APP: OpenOversight.app
OO_HELP_EMAIL: "[email protected]"
OO_SERVICE_EMAIL: "[email protected]"
TIMEZONE: "America/Chicago"
volumes:
- ./OpenOversight/:/usr/src/app/OpenOversight/:z
- ./build/test-results:/test-results