-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.compose.yaml
60 lines (57 loc) · 1.44 KB
/
env.compose.yaml
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
version: "3.8"
services:
microservices_postgesql:
image: postgres:13-alpine
container_name: microservices_postgesql
expose:
- "5432"
ports:
- "5432:5432"
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=p4ssw0rd
- POSTGRES_DB=products
- POSTGRES_HOST=5432
command: -p 5432
volumes:
- ./data/pgdata:/var/lib/postgresql/data
networks: [ "microservices" ]
redis:
image: redis:6-alpine
restart: always
container_name: microservices_redis
ports:
- "6379:6379"
networks: [ "microservices" ]
etcd:
hostname: etcd
image: bitnami/etcd
deploy:
replicas: 1
restart_policy:
condition: on-failure
# ports:
# - "2379:2379"
# - "2380:2380"
# - "4001:4001"
# - "7001:7001"
privileged: true
volumes:
- "./data/etcd:/bitnami/etcd/data"
environment:
- "ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379"
- "ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379"
- "ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380"
- "ETCD_INITIAL_ADVERTISE_PEER_URLS=http://0.0.0.0:2380"
- "ALLOW_NONE_AUTHENTICATION=yes"
- "ETCD_INITIAL_CLUSTER=node1=http://0.0.0.0:2380"
- "ETCD_NAME=node1"
- "ETCD_DATA_DIR=/opt/bitnami/etcd/data"
ports:
- 2379:2379
- 2380:2380
networks: ["microservices"]
networks:
microservices:
name: microservices