-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
120 lines (113 loc) · 2.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
120 lines (113 loc) · 2.62 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
services:
frontend:
build:
context: ./frontend-vue
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./frontend-vue:/app
- /app/node_modules
networks:
- app-network
environment:
- VITE_API_URL=http://localhost:8000
- VITE_AUTH_URL=http://localhost:8080
depends_on:
- fastapi
- php
fastapi:
build:
context: ./backend-fastapi
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./backend-fastapi:/app
- music-storage:/app/storage
environment:
- DATABASE_URL=mariadb://root:password@mariadb/musicdb
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/1
- CELERY_RESULT_BACKEND=redis://redis:6379/2
- JWT_SECRET=musictogether_secret_key_change_in_prod
networks:
- app-network
depends_on:
- mariadb
- redis
php:
build:
context: ./php-auth
dockerfile: Dockerfile
ports:
- "8080:80"
volumes:
- ./php-auth:/var/www/html
environment:
- MYSQL_HOST=mariadb
- MYSQL_DATABASE=musicdb
- MYSQL_USER=root
- MYSQL_PASSWORD=password
- JWT_SECRET=musictogether_secret_key_change_in_prod
- APP_ENV=development
networks:
- app-network
depends_on:
- mariadb
mariadb:
image: mariadb:latest
container_name: mariadb
ports:
- "3306:3306"
volumes:
- ./mariadb-data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_DATABASE=musicdb
networks:
- app-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
celery:
build:
context: ./backend-fastapi
dockerfile: Dockerfile
command: celery -A app.worker worker --loglevel=info
volumes:
- ./backend-fastapi:/app
- music-storage:/app/storage
environment:
- DATABASE_URL=mariadb://root:password@mariadb/musicdb
- REDIS_URL=redis://redis:6379/0
- CELERY_BROKER_URL=redis://redis:6379/1
- CELERY_RESULT_BACKEND=redis://redis:6379/2
- JWT_SECRET=musictogether_secret_key_change_in_prod
networks:
- app-network
depends_on:
- redis
- mariadb
volumes:
mariadb-data:
redis-data:
music-storage:
networks:
app-network:
driver: bridge