-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
113 lines (106 loc) · 4.31 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
# WorkR
# Copyright (C) 2023
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
version: '3.1'
services:
WorkR:
# r celery worker
restart: always
build:
context: ./
dockerfile: Dockerfile
image: workr:latest
container_name: WorkR
volumes:
- ./:/code/
- /home/ubuntu/TrapTagger/app/models.py:/code/app/models.py
- /home/ubuntu/TrapTagger/WorkR/__init__.py:/code/app/__init__.py
environment:
- PYTHONPATH=/code
- FLASK_APP=/code/TrapTagger.py
- REDIS_IP=${REDIS_IP}
- DATABASE_NAME=${DATABASE_NAME}
- HOST_IP=${HOST_IP}
- DNS=${DNS}
- DATABASE_SERVER=${DATABASE_SERVER}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- REGION_NAME=${REGION_NAME}
- SECRET_KEY=${SECRET_KEY}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- BRANCH=${BRANCH}
- SG_ID=${SG_ID}
- PUBLIC_SUBNET_ID=${PUBLIC_SUBNET_ID}
- PRIVATE_SUBNET_ID=${PRIVATE_SUBNET_ID}
- TOKEN=${TOKEN}
- PARALLEL_AMI=${PARALLEL_AMI}
- KEY_NAME=${KEY_NAME}
- QUEUE=${QUEUE}
- WORKER_NAME=${WORKER_NAME}
- MAIN_GIT_REPO=${MAIN_GIT_REPO}
- MONITORED_EMAIL_ADDRESS=${MONITORED_EMAIL_ADDRESS}
- BUCKET=${BUCKET}
- IAM_ADMIN_GROUP=${IAM_ADMIN_GROUP}
- AWS_S3_DOWNLOAD_ACCESS_KEY_ID=${AWS_S3_DOWNLOAD_ACCESS_KEY_ID}
- AWS_S3_DOWNLOAD_SECRET_ACCESS_KEY=${AWS_S3_DOWNLOAD_SECRET_ACCESS_KEY}
- MONKEY_PATCH=false
command: celery -A worker worker -E -n ${WORKER_NAME} -Q ${QUEUE} -Ofair --concurrency=${CONCURRENCY} --loglevel=info
networks:
- my-network
WorkR2:
# r celery worker
restart: always
build:
context: ./
dockerfile: Dockerfile
image: workr:latest
container_name: WorkR2
volumes:
- ./:/code/
- /home/ubuntu/TrapTagger/app/models.py:/code/app/models.py
- /home/ubuntu/TrapTagger/WorkR/__init__.py:/code/app/__init__.py
environment:
- PYTHONPATH=/code
- FLASK_APP=/code/TrapTagger.py
- REDIS_IP=${REDIS_IP}
- DATABASE_NAME=${DATABASE_NAME}
- HOST_IP=${HOST_IP}
- DNS=${DNS}
- DATABASE_SERVER=${DATABASE_SERVER}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- REGION_NAME=${REGION_NAME}
- SECRET_KEY=${SECRET_KEY}
- MAIL_USERNAME=${MAIL_USERNAME}
- MAIL_PASSWORD=${MAIL_PASSWORD}
- BRANCH=${BRANCH}
- SG_ID=${SG_ID}
- PUBLIC_SUBNET_ID=${PUBLIC_SUBNET_ID}
- PRIVATE_SUBNET_ID=${PRIVATE_SUBNET_ID}
- TOKEN=${TOKEN}
- PARALLEL_AMI=${PARALLEL_AMI}
- KEY_NAME=${KEY_NAME}
- QUEUE=${QUEUE}
- WORKER_NAME=${WORKER_NAME}
- MAIN_GIT_REPO=${MAIN_GIT_REPO}
- MONITORED_EMAIL_ADDRESS=${MONITORED_EMAIL_ADDRESS}
- BUCKET=${BUCKET}
- IAM_ADMIN_GROUP=${IAM_ADMIN_GROUP}
- AWS_S3_DOWNLOAD_ACCESS_KEY_ID=${AWS_S3_DOWNLOAD_ACCESS_KEY_ID}
- AWS_S3_DOWNLOAD_SECRET_ACCESS_KEY=${AWS_S3_DOWNLOAD_SECRET_ACCESS_KEY}
- MONKEY_PATCH=false
command: celery -A worker worker -E -n ${WORKER_NAME} -Q ${QUEUE} -Ofair --concurrency=${CONCURRENCY} --loglevel=info
networks:
- my-network
networks:
my-network: