-
Notifications
You must be signed in to change notification settings - Fork 362
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
163 lines (155 loc) · 4.07 KB
/
docker-compose.prod.yml
File metadata and controls
163 lines (155 loc) · 4.07 KB
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
160
161
162
163
name: flowsint-prod
services:
postgres:
image: postgres:15-alpine
container_name: flowsint-postgres-prod
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER:-flowsint}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-flowsint}
POSTGRES_DB: ${POSTGRES_DB:-flowsint}
ports:
- "5433:5432"
volumes:
- pg_data_prod:/var/lib/postgresql/data
networks:
- flowsint_network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-flowsint}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: flowsint-redis-prod
restart: always
ports:
- "6379:6379"
networks:
- flowsint_network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
neo4j:
image: neo4j:5
container_name: flowsint-neo4j-prod
restart: always
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=${NEO4J_USERNAME}/${NEO4J_PASSWORD}
- NEO4J_PLUGINS=["apoc"]
- NEO4J_apoc_export_file_enabled=true
- NEO4J_apoc_import_file_enabled=true
- NEO4J_apoc_import_file_use__neo4j__config=true
volumes:
- neo4j_data_prod:/data
- neo4j_logs_prod:/logs
- neo4j_import_prod:/var/lib/neo4j/import
- neo4j_plugins_prod:/plugins
networks:
- flowsint_network
healthcheck:
test: cypher-shell -u ${NEO4J_USERNAME} -p ${NEO4J_PASSWORD} "RETURN 1"
interval: 5s
timeout: 5s
retries: 10
api:
build:
context: .
dockerfile: flowsint-api/Dockerfile
target: production
container_name: flowsint-api-prod
restart: always
ports:
- "5001:5001"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-flowsint}:${POSTGRES_PASSWORD:-flowsint}@postgres:5432/${POSTGRES_DB:-flowsint}
- NEO4J_URI_BOLT=bolt://neo4j:7687
- NEO4J_USERNAME=${NEO4J_USERNAME}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
- AUTH_SECRET=${AUTH_SECRET}
- MASTER_VAULT_KEY_V1=${MASTER_VAULT_KEY_V1}
- REDIS_URL=redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
neo4j:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5001/health || exit 1"]
interval: 10s
timeout: 5s
retries: 5
networks:
- flowsint_network
celery:
build:
context: .
dockerfile: flowsint-api/Dockerfile
target: production
container_name: flowsint-celery-prod
restart: always
command:
[
"celery",
"-A",
"flowsint_core.core.celery",
"worker",
"--loglevel=info",
"--pool=threads",
"--concurrency=10",
]
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DATABASE_URL=postgresql://${POSTGRES_USER:-flowsint}:${POSTGRES_PASSWORD:-flowsint}@postgres:5432/${POSTGRES_DB:-flowsint}
- NEO4J_URI_BOLT=bolt://neo4j:7687
- NEO4J_USERNAME=${NEO4J_USERNAME}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
- MASTER_VAULT_KEY_V1=${MASTER_VAULT_KEY_V1}
- REDIS_URL=redis://redis:6379/0
- SKIP_MIGRATIONS=true
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
neo4j:
condition: service_healthy
api:
condition: service_healthy
networks:
- flowsint_network
app:
build:
context: ./flowsint-app
dockerfile: Dockerfile
args:
- VITE_API_URL=${VITE_API_URL}
container_name: flowsint-app-prod
restart: always
ports:
- "5173:8080"
networks:
- flowsint_network
depends_on:
api:
condition: service_healthy
networks:
flowsint_network:
name: flowsint_network_prod
driver: bridge
volumes:
pg_data_prod:
neo4j_data_prod:
neo4j_logs_prod:
neo4j_import_prod:
neo4j_plugins_prod: