-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
54 lines (50 loc) · 1.41 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
53
54
version: "3.9"
services:
server:
build: .
container_name: ${SERVER_CONTAINER_NAME}
ports:
# Keep target port identical with port in application.yaml
- target: 8080
published: ${SERVER_PUBLISHED_PORT}
volumes:
# this volume contains server log and uploaded image
- type: bind
source: ${SERVER_STATIC_MOUNTPOINT}
target: /app/static
depends_on:
- mariadb
- redis
entrypoint: [ "/app/wait-for-it.sh", "mariadb:3306", "-s", "--",
"/app/wait-for-it.sh", "redis:6379", "-s", "--",
"sh", "-c", "java ${JAVA_OPTS} -jar /app/app.jar" ]
mariadb:
image: "mariadb:10.5"
container_name: ${MARIADB_CONTAINER_NAME}
volumes:
- type: volume
source: mariadb_data
target: /var/lib/mysql
# initial database definition
- type: bind
source: ./deploy/mariadb/init
target: /docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: bitrxc
redis:
image: "redis:6.2"
container_name: ${REDIS_CONTAINER_NAME}
volumes:
- type: bind
source: ./deploy/redis/conf
target: /etc/redis
- type: volume
source: redis_data
target: /data
entrypoint: [ "redis-server", "/etc/redis/redis.conf" ]
volumes:
redis_data:
name: ${REDIS_VOLUMN_NAME}
mariadb_data:
name: ${MARIADB_VOLUMN_NAME}