-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
134 lines (126 loc) · 3.18 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
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
version: "3.8"
networks:
local:
name: local
driver: bridge
ipam:
driver: default
config:
- subnet: 172.10.0.0/16
gateway: 172.10.0.1
services:
node:
build:
context: ./node
args:
- INSTALL_VERSION=${NODE_VERSION}
image: local-node-${NODE_VERSION}
container_name: local-node-${NODE_VERSION}
volumes:
- ${CODE_PATH_HOST}:${CODE_PATH_CONTAINER}
ports:
- "${NODE_PORT}:${NODE_PORT}"
networks:
- local
tty: true
python:
build:
context: ./python
args:
- PYTHON_VERSION=${PYTHON_VERSION}
image: local-python-${PYTHON_VERSION}
container_name: local-python-${PYTHON_VERSION}
volumes:
- ${CODE_PATH_HOST}:${CODE_PATH_CONTAINER}
ports:
- "${PYTHON_PORT}:${PYTHON_PORT}"
networks:
- local
tty: true
mariadb:
build:
context: ./mariadb
args:
- MARIADB_VERSION=${MARIADB_VERSION}
image: local-mariadb-${MARIADB_VERSION}
container_name: local-mariadb-${MARIADB_VERSION}
hostname: mariadb
environment:
- MARIADB_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
volumes:
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
ports:
- "${MARIADB_HOST_PORT}:3306"
networks:
- local
tty: true
mongo:
build:
context: ./mongo
args:
- MONGO_VERSION=${MONGO_VERSION}
image: local-mongo-${MONGO_VERSION}
container_name: local-mongo-${MONGO_VERSION}
hostname: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
volumes:
- ${DATA_PATH_HOST}/mongo:/data/db
ports:
- "${MONGO_HOST_PORT}:27017"
networks:
- local
tty: true
rabbitmq:
build:
context: ./rabbitmq
args:
- RABBITMQ_VERSION=${RABBITMQ_VERSION}
image: local-rabbitmq-${RABBITMQ_VERSION}
container_name: local-rabbitmq-${RABBITMQ_VERSION}
hostname: rabbitmq
volumes:
- ${DATA_PATH_HOST}/rabbitmq:/var/lib/rabbitmq/mnesia
ports:
- "${RABBITMQ_HOST_PORT}:15672"
networks:
- local
tty: true
redis:
build:
context: ./redis
args:
- REDIS_VERSION=${REDIS_VERSION}
image: local-redis-${REDIS_VERSION}
container_name: local-redis-${REDIS_VERSION}
hostname: redis
entrypoint: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- ${DATA_PATH_HOST}/redis/data:/data
ports:
- "${REDIS_HOST_PORT}:6379"
networks:
- local
tty: true
postgres:
build:
context: ./postgres
args:
- POSTGRES_VERSION=${POSTGRES_VERSION}
image: local-postgres-${POSTGRES_VERSION}
container_name: local-postgres-${POSTGRES_VERSION}
hostname: postgres
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- PGDATA=${PGDATA}
volumes:
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
ports:
- "${POSTGRES_HOST_PORT}:5432"
networks:
- local
tty: true