forked from camelya58/post-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (73 loc) · 1.6 KB
/
docker-compose.yml
File metadata and controls
73 lines (73 loc) · 1.6 KB
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
version: '3'
services:
# mongo-service
mongo:
container_name: mongo-service
image: mongo:latest
restart: always
networks:
- net
volumes:
- ./data:/data/db
ports:
- "27017:27017"
postgres-service:
image: postgres:11.1
container_name: postgres-service
networks:
- net
ports:
- 5433:5432
volumes:
- ./.postgres-data:/var/lib/postgresql/data:rw
environment:
LC_ALL: 'C.UTF-8'
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST: postgres
POSTGRES_DB: keycloak
PGDATA: /var/lib/postgresql/data
restart: unless-stopped
# keycloak-service
keycloak-service:
image: jboss/keycloak:12.0.0
container_name: keycloak-service
networks:
- net
ports:
- 7070:8080
expose:
- "7070"
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
DB_VENDOR: POSTGRES
DB_ADDR: postgres-service
DB_PORT: 5432
DB_USER: postgres
DB_PASSWORD: postgres
DB_DATABASE: keycloak
DB_SCHEMA: public
depends_on:
- postgres-service
restart: unless-stopped
# post-service
post-service:
build: ./
container_name: post-service
networks:
- net
ports:
- 8000:8000
expose:
- "8000"
restart: unless-stopped
environment:
- "SERVICE_NAME=post-service"
- "PORT=8000"
- "KEYCLOAK_URI=http://keycloak-service:8080/auth"
- "KEYCLOAK_CLIENT_SECRET=f9e363b1-3599-4ca7-ba44-2b3d5d5c57dc"
- "EUREKA_ENABLED=false"
networks:
net:
driver: "bridge"