Commit
·
7c4a0d7
1
Parent(s):
e85ed70
deplyment phase
Browse files- docker-compose.yml +58 -5
- docker.compose.prod.yml +0 -60
docker-compose.yml
CHANGED
@@ -1,5 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
services:
|
2 |
-
# --- Application Services ---
|
3 |
redis:
|
4 |
image: redis:7-alpine
|
5 |
ports:
|
@@ -46,7 +102,4 @@ services:
|
|
46 |
- /app/node_modules
|
47 |
restart: always
|
48 |
depends_on:
|
49 |
-
- backend
|
50 |
-
|
51 |
-
# No other services or volumes are needed.
|
52 |
-
# The 'mlflow' service and its 'mlflow_server_data' volume have been completely removed.
|
|
|
1 |
+
# services:
|
2 |
+
# # --- Application Services ---
|
3 |
+
# redis:
|
4 |
+
# image: redis:7-alpine
|
5 |
+
# ports:
|
6 |
+
# - "6379:6379"
|
7 |
+
# restart: always
|
8 |
+
|
9 |
+
# backend:
|
10 |
+
# build:
|
11 |
+
# context: .
|
12 |
+
# dockerfile: ./backend/Dockerfile
|
13 |
+
# ports:
|
14 |
+
# - "8000:8000"
|
15 |
+
# volumes:
|
16 |
+
# - ./backend:/code/app
|
17 |
+
# env_file:
|
18 |
+
# - .env
|
19 |
+
# command: python -m uvicorn main:app --host 0.0.0.0 --port 8000 --reload
|
20 |
+
# restart: always
|
21 |
+
# depends_on:
|
22 |
+
# - redis
|
23 |
+
|
24 |
+
# worker:
|
25 |
+
# build:
|
26 |
+
# context: .
|
27 |
+
# dockerfile: ./backend/Dockerfile
|
28 |
+
# volumes:
|
29 |
+
# - ./backend:/code/app
|
30 |
+
# env_file:
|
31 |
+
# - .env
|
32 |
+
# command: python -m celery -A celery_worker.celery worker --loglevel=info
|
33 |
+
# restart: always
|
34 |
+
# depends_on:
|
35 |
+
# - redis
|
36 |
+
# - backend
|
37 |
+
|
38 |
+
# frontend:
|
39 |
+
# build:
|
40 |
+
# context: .
|
41 |
+
# dockerfile: ./frontend/Dockerfile
|
42 |
+
# ports:
|
43 |
+
# - "5173:5173"
|
44 |
+
# volumes:
|
45 |
+
# - ./frontend:/app
|
46 |
+
# - /app/node_modules
|
47 |
+
# restart: always
|
48 |
+
# depends_on:
|
49 |
+
# - backend
|
50 |
+
|
51 |
+
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
services:
|
|
|
59 |
redis:
|
60 |
image: redis:7-alpine
|
61 |
ports:
|
|
|
102 |
- /app/node_modules
|
103 |
restart: always
|
104 |
depends_on:
|
105 |
+
- backend
|
|
|
|
|
|
docker.compose.prod.yml
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
services:
|
2 |
-
# --- Application Services ---
|
3 |
-
redis:
|
4 |
-
image: redis:7-alpine
|
5 |
-
# In production, you wouldn't typically expose the Redis port to the public internet.
|
6 |
-
# The other containers can still talk to it over the internal Docker network.
|
7 |
-
# ports:
|
8 |
-
# - "6379:6379"
|
9 |
-
restart: always
|
10 |
-
|
11 |
-
backend:
|
12 |
-
build:
|
13 |
-
context: .
|
14 |
-
dockerfile: ./backend/Dockerfile
|
15 |
-
ports:
|
16 |
-
# We expose port 8000 for external traffic
|
17 |
-
- "8000:8000"
|
18 |
-
# VOLUMES REMOVED: The code is now baked into the image. No hot-reloading needed.
|
19 |
-
# volumes:
|
20 |
-
# - ./backend:/code/app
|
21 |
-
env_file:
|
22 |
-
- .env
|
23 |
-
# COMMAND CHANGED: We use a production-grade server like Gunicorn instead of Uvicorn's dev server.
|
24 |
-
# The '--reload' flag is removed.
|
25 |
-
command: python -m gunicorn -w 4 -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:8000
|
26 |
-
restart: always
|
27 |
-
depends_on:
|
28 |
-
- redis
|
29 |
-
|
30 |
-
worker:
|
31 |
-
build:
|
32 |
-
context: .
|
33 |
-
dockerfile: ./backend/Dockerfile
|
34 |
-
# VOLUMES REMOVED: The worker also uses the code baked into the image.
|
35 |
-
# volumes:
|
36 |
-
# - ./backend:/code/app
|
37 |
-
env_file:
|
38 |
-
- .env
|
39 |
-
command: python -m celery -A celery_worker.celery worker --loglevel=info
|
40 |
-
restart: always
|
41 |
-
depends_on:
|
42 |
-
- redis
|
43 |
-
- backend
|
44 |
-
|
45 |
-
frontend:
|
46 |
-
build:
|
47 |
-
context: .
|
48 |
-
# We would use a multi-stage Dockerfile that builds the static files
|
49 |
-
# and serves them with a production server like Nginx.
|
50 |
-
dockerfile: ./frontend/Dockerfile.prod
|
51 |
-
ports:
|
52 |
-
# The production frontend is served on the standard HTTP port 80.
|
53 |
-
- "80:80"
|
54 |
-
# VOLUMES REMOVED: The static files are baked into the image.
|
55 |
-
# volumes:
|
56 |
-
# - ./frontend:/app
|
57 |
-
# - /app/node_modules
|
58 |
-
restart: always
|
59 |
-
depends_on:
|
60 |
-
- backend
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|