-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
141 lines (140 loc) · 3.37 KB
/
docker-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
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
135
136
137
138
139
140
141
version: '3.9'
services:
postgres:
container_name: db
network_mode: my-network
environment:
- POSTGRES_PASSWORD=foobarbaz
- POSTGRES_DB=blogx_db
volumes:
- 'pg_data_blogx:/var/lib/postgresql/data'
- './db/init.sql:/docker-entrypoint-initdb.d/init.sql'
ports:
- '5432:5432'
restart: always
image: 'postgres:15.1-alpine'
redis:
container_name: redis
network_mode: my-network
ports:
- '6379:6379'
restart: always
image: 'redis:7-alpine'
haproxy:
container_name: haproxy
network_mode: my-network
ports:
- '8000:80'
restart: always
image: sohamkr/blogx_haproxy:0.0
# build:
# context: ./haproxy/
# dockerfile: Dockerfile
api_auth:
container_name: auth
network_mode: my-network
environment:
- POSTGRES_DB=blogx_db
- POSTGRES_PASSWORD=foobarbaz
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=foobarbaz
- DB_NAME=blogx_db
- PORT=8080
- JWT_SECRET_KEY=blogx_secret_key
- BCRYPT_SALT_VALUE=12
- 'DB_URL=postgres://postgres:foobarbaz@db:5432/blogx_db?sslmode=disable'
ports:
- '8080:8080'
restart: always
links:
- postgres
image: 'sohamkr/blogx_auth:0.0'
# build:
# context: ./authentication/
# dockerfile: Dockerfile
api_blog:
container_name: blog
network_mode: my-network
environment:
- POSTGRES_PASSWORD=foobarbaz
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=foobarbaz
- DB_NAME=blogx_db
- PORT=8081
- JWT_SECRET_KEY=blogx_secret_key
- BCRYPT_SALT_VALUE=12
- 'DB_URL=postgres://postgres:foobarbaz@db:5432/blogx_db?sslmode=disable'
ports:
- '8081:8081'
restart: always
links:
- postgres
image: 'sohamkr/blogx_blog:0.0'
# build:
# context: ./blog/
# dockerfile: Dockerfile
api_feed:
container_name: feed
network_mode: my-network
environment:
- POSTGRES_PASSWORD=foobarbaz
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=foobarbaz
- DB_NAME=blogx_db
- PORT=8082
- JWT_SECRET_KEY=blogx_secret_key
- BCRYPT_SALT_VALUE=12
- 'DB_URL=postgres://postgres:foobarbaz@db:5432/blogx_db?sslmode=disable'
ports:
- '8082:8082'
restart: always
links:
- postgres
image: 'sohamkr/blogx_feed:0.0'
# build:
# context: ./feed/
# dockerfile: Dockerfile
api_user:
container_name: user
network_mode: my-network
environment:
- POSTGRES_PASSWORD=foobarbaz
- DB_HOST=db
- DB_PORT=5432
- DB_USER=postgres
- DB_PASSWORD=foobarbaz
- DB_NAME=blogx_db
- PORT=8083
- JWT_SECRET_KEY=blogx_secret_key
- BCRYPT_SALT_VALUE=12
- 'DB_URL=postgres://postgres:foobarbaz@db:5432/blogx_db?sslmode=disable'
ports:
- '8083:8083'
restart: always
links:
- postgres
image: 'sohamkr/blogx_user:0.1'
# build:
# context: ./user/
# dockerfile: Dockerfile
swagger_ui:
container_name: swagger
network_mode: my-network
ports:
- '8084:8084'
restart: always
image: 'sohamkr/blogx_swagger:0.0'
# build:
# context: ./swagger/
# dockerfile: Dockerfile
volumes:
pg_data_blogx:
networks:
my-network:
driver: bridge