Skip to content

Commit d715e33

Browse files
committed
Production uses docker hub image
1 parent 9fac086 commit d715e33

File tree

2 files changed

+35
-7
lines changed

2 files changed

+35
-7
lines changed

docker-compose.build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
version: '3'
2+
volumes:
3+
mongodb_data:
4+
external: false
5+
services:
6+
flask:
7+
container_name: annotator_flask
8+
restart: always
9+
build:
10+
context: .
11+
dockerfile: ./docker/production/Dockerfile
12+
ports:
13+
- '5000:5000'
14+
volumes:
15+
- './datasets:/datasets'
16+
- './app:/workspace/app'
17+
- './.git:/workspace/.git'
18+
environment:
19+
- FLASK_APP=app
20+
- FLASK_ENV=production
21+
depends_on:
22+
- database
23+
database:
24+
image: mongo:latest
25+
container_name: annotator_mongodb
26+
restart: always
27+
environment:
28+
- MONGO_DATA_DIR=/data/db
29+
- MONGO_LOG_DIR=/dev/null
30+
volumes:
31+
- 'mongodb_data:/data/db'
32+
ports:
33+
- '27017:27017'
34+
command: 'mongod --smallfiles --logpath=/dev/null'

docker-compose.prod.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@ volumes:
44
external: false
55
services:
66
flask:
7-
container_name: annotator_flask
7+
image: jsbroks/coco-annotator:latest
88
restart: always
9-
build:
10-
context: .
11-
dockerfile: ./docker/production/Dockerfile
129
ports:
1310
- '5000:5000'
1411
volumes:
1512
- './datasets:/datasets'
1613
- './app:/workspace/app'
1714
- './.git:/workspace/.git'
18-
environment:
19-
- FLASK_APP=app
20-
- FLASK_ENV=production
2115
depends_on:
2216
- database
2317
database:

0 commit comments

Comments
 (0)