-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdocker-compose.yml
159 lines (150 loc) · 6.06 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: '2.3'
services:
postgres:
image: postgres:14
environment:
# Remember to change the config.yaml [database.uri] file if you change this
POSTGRES_PASSWORD: "admin"
POSTGRES_DB: "videodeduplicationdb"
WINNOW_CONFIG: /config.yml
ports:
- "${BENETECH_PG_PORT:-5432}:5432"
volumes:
# Set the BENETECH_PG_DATA environment variable to the path on your host machine
# where you would like to save your DB data
- "${BENETECH_PG_DATA:-postgres-data}:/var/lib/postgresql/data"
networks:
- postgres-compose-network
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: "admin@admin.com"
PGADMIN_DEFAULT_PASSWORD: "admin"
PGADMIN_SERVER_JSON_FILE: "/project/servers.json"
ports:
- "${BENETECH_PG_ADMIN_PORT:-16543}:80"
depends_on:
- postgres
networks:
- postgres-compose-network
dedup-app:
image: "johnhbenetech/videodeduplication:${BENETECH_RUNTIME:-gpu}${BENETECH_MODE}"
build:
context: .
dockerfile: "docker/Dockerfile.dedup-${BENETECH_RUNTIME:-gpu}"
target: prod
args:
GIT_HASH: "${GIT_HASH:-UNKNOWN}"
runtime: "${BENETECH_DOCKER_RUNTIME:-nvidia}"
command: bash -ic "bash serve_jupyter.sh"
environment:
PGADMIN_DEFAULT_EMAIL: "admin@admin.com"
PGADMIN_DEFAULT_PASSWORD: "admin"
WINNOW_CONFIG: "/project/config/config.yaml"
# TODO: Migrate to v3 and uncomment (issue #267)
# BENETECH_MASTER_KEY_PATH: "${BENETECH_MASTER_KEY_PATH}"
volumes:
# Set the BENETECH_DATA_LOCATION environment variable to the path
# on your host machine where you placed the source data
- "${BENETECH_DATA_LOCATION:?\n\nPlease set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
# You can specify BENETECH_FILE_STORAGE_DIRECTORY environment variable to
# keep template examples in a specific directory in your host fs.
- "${BENETECH_FILE_STORAGE_DIRECTORY:-file-storage}:/project/file-storage"
# You can specify BENETECH_CONFIG_DIRECTORY environment variable to
# keep application configs in a specific directory in your host fs.
- "${BENETECH_CONFIG_DIRECTORY:-config}:/project/config"
ports:
- "${BENETECH_DEDUP_PORT:-8888}:8888"
depends_on:
- postgres
# TODO: Migrate to v3 and uncomment secrets (issue #267)
# secrets:
# - benetech_master_key
networks:
- postgres-compose-network
redis:
image: "redis:alpine"
ports:
- 6379:6379
networks:
- postgres-compose-network
celery-worker:
image: "johnhbenetech/videodeduplication:${BENETECH_RUNTIME:-gpu}${BENETECH_MODE}"
build:
context: .
dockerfile: "docker/Dockerfile.dedup-${BENETECH_RUNTIME:-gpu}"
target: prod
args:
GIT_HASH: "${GIT_HASH:-UNKNOWN}"
runtime: "${BENETECH_DOCKER_RUNTIME:-nvidia}"
command: bash -ic "python -m task_queue.application worker --loglevel=INFO -E"
environment:
PGADMIN_DEFAULT_EMAIL: "admin@admin.com"
PGADMIN_DEFAULT_PASSWORD: "admin"
WINNOW_CONFIG: "/project/config/config.yaml"
CELERY_BROKER: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
TASK_LOG_DIRECTORY: "/project/pipeline-logs"
volumes:
# Set the BENETECH_DATA_LOCATION environment variable to the path
# on your host machine where you placed the source data
- "${BENETECH_DATA_LOCATION:?\n\nPlease set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
# You may want to set BENETECH_TASK_LOGS environment variable to
# keep pipeline logs in a specific directory in your host fs.
- "${BENETECH_TASK_LOGS:-pipeline-logs}:/project/pipeline-logs"
# You can specify BENETECH_FILE_STORAGE_DIRECTORY environment variable to
# keep template examples in a specific directory in your host fs.
- "${BENETECH_FILE_STORAGE_DIRECTORY:-file-storage}:/project/file-storage"
# You can specify BENETECH_CONFIG_DIRECTORY environment variable to
# keep application configs in a specific directory in your host fs.
- "${BENETECH_CONFIG_DIRECTORY:-config}:/project/config"
depends_on:
- postgres
networks:
- postgres-compose-network
server:
image: "johnhbenetech/videodeduplication:server${BENETECH_MODE}"
build:
context: .
dockerfile: docker/Dockerfile.server
args:
GIT_HASH: "${GIT_HASH:-UNKNOWN}"
environment:
SERVER_HOST: "0.0.0.0"
SERVER_PORT: "5000"
STATIC_FOLDER: "static"
DATABASE_URI: "postgres://postgres:admin@postgres:5432/videodeduplicationdb"
VIDEO_FOLDER: "/project/data/"
THUMBNAIL_CACHE_FOLDER: "/project/thumbnails"
THUMBNAIL_CACHE_CAP: 10000
CELERY_BROKER: "redis://redis:6379/0"
CELERY_RESULT_BACKEND: "redis://redis:6379/0"
TASK_LOG_DIRECTORY: "/project/pipeline-logs"
FILE_STORE_DIRECTORY: "/project/file-storage"
volumes:
# Set the BENETECH_DATA_LOCATION environment variable to the path
# on your host machine where you placed your video files
- "${BENETECH_DATA_LOCATION:?\n\nPlease set \"BENETECH_DATA_LOCATION\" environment variable to the root folder of your video files.}:/project/data"
# You may want to set BENETECH_TASK_LOGS environment variable to
# keep pipeline logs in a specific directory in your host fs.
- "${BENETECH_TASK_LOGS:-pipeline-logs}:/project/pipeline-logs"
# You can specify BENETECH_FILE_STORAGE_DIRECTORY environment variable to
# keep template examples in a specific directory in your host fs.
- "${BENETECH_FILE_STORAGE_DIRECTORY:-file-storage}:/project/file-storage"
ports:
- "${BENETECH_SERVER_PORT:-5000}:5000"
depends_on:
- postgres
networks:
- postgres-compose-network
networks:
postgres-compose-network:
volumes:
postgres-data:
pipeline-logs:
file-storage:
config:
# TODO: Migrate to v3 and uncomment secrets (issue #267)
#secrets:
# benetech_master_key:
# external: true