-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.23 KB
/
docker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.23 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
version: '3.8'
services:
mysql:
image: mysql:8.0
container_name: auth-mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: auth_db
MYSQL_USER: auth_user
MYSQL_PASSWORD: secure_password
ports:
- "3306:3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
auth-service:
build:
context: ./server
dockerfile: Dockerfile
container_name: auth-service
restart: always
ports:
- "8080:8080"
environment:
MYSQL_HOST: mysql
MYSQL_PORT: 3306
MYSQL_DATABASE: auth_db
MYSQL_USERNAME: auth_user
MYSQL_PASSWORD: secure_password
JWT_SECRET: your-secret-key-here-please-change-in-production
JWT_EXPIRATION: 3600000
REFRESH_TOKEN_EXPIRATION: 604800000
depends_on:
mysql:
condition: service_healthy
auth-client:
build:
context: ./client
dockerfile: Dockerfile
container_name: auth-client
restart: always
environment:
SERVER_URL: http://auth-service:8080
depends_on:
- auth-service
volumes:
mysql-data: