-
Notifications
You must be signed in to change notification settings - Fork 79
/
docker-compose.yml
70 lines (65 loc) · 1.89 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
version: "3.2"
volumes:
postgres:
driver: local
secrets:
service-account-key:
file: ./service_account_key.json
services:
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
environment:
APPROVE_REGISTRATIONS: "${APPROVE_REGISTRATIONS}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION}"
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
ENV: "development"
FLASK_APP: OpenOversight.app
FLASK_DEBUG: 1
OO_HELP_EMAIL: "[email protected]"
OO_SERVICE_EMAIL: "[email protected]"
S3_BUCKET_NAME: "${S3_BUCKET_NAME}"
# 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
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