-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
52 lines (49 loc) · 1.09 KB
/
docker-compose.yml
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
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: get-p-server
env_file:
- ${ENV_FILE}
depends_on:
- redis
- database
ports:
- ${SPRING_PORT}:${SPRING_PORT}
restart: always
volumes:
- type: bind
source: ${SERVER_STORAGE_PATH}
target: ${STORAGE_PATH}
database:
image: mysql:9.0.0
container_name: get-p-database
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
command:
--port=${DB_PORT} --max_allowed_packet=32M
expose:
- ${DB_PORT}
ports:
- ${DB_PORT}:${DB_PORT}
restart: always
volumes:
- get-p-database:/var/lib/mysql
redis:
image: redis:latest
container_name: get-p-redis
command: --port ${REDIS_PORT} --requirepass ${REDIS_PASSWORD}
expose:
- ${REDIS_PORT}
ports:
- ${REDIS_PORT}:${REDIS_PORT}
volumes:
- get-p-redis:/data
restart: always
volumes:
get-p-database:
get-p-redis: