Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (71 loc) · 1.78 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (71 loc) · 1.78 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
version: '3.8'
services:
mysql:
image: mysql:5.7
container_name: photo-exhibition-mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: photo_exhibition
MYSQL_USER: photo_user
MYSQL_PASSWORD: photo_pass
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./database/schema.sql:/docker-entrypoint-initdb.d/schema.sql
networks:
- photo-network
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: photo-exhibition-redis
ports:
- "6380:6379"
volumes:
- redis_data:/data
networks:
- photo-network
restart: unless-stopped
command: redis-server --appendonly yes
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: photo-exhibition-backend
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/photo_exhibition?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: root
SPRING_REDIS_HOST: redis
SPRING_REDIS_PORT: 6379
PHOTO_SCAN_BASE_PATH: /data/photos
LOGGING_LEVEL_COM_PHOTOEXHIBITION_SERVICE_PHOTOSCANSERVICE: DEBUG
ports:
- "6060:6060"
volumes:
- ./data/photos:/data/photos
- ./data/thumbnails:/data/thumbnails
depends_on:
- mysql
- redis
networks:
- photo-network
restart: unless-stopped
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: photo-exhibition-frontend
ports:
- "3030:80"
depends_on:
- backend
networks:
- photo-network
restart: unless-stopped
volumes:
mysql_data:
redis_data:
networks:
photo-network:
driver: bridge