-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
100 lines (92 loc) · 2.04 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
version: "3.9"
# Por defecto se crean todos los servicios en la misma red, entonces no hay necesidad de especificar
# explicitamente la red que comparten
services:
msvc-gateway:
container_name: gateway
# image: curenosm/gateway:latest
build:
context: ./
dockerfile: ./msvc-gateway/Dockerfile
ports:
- "8090:8090"
networks:
- spring
restart: always
mysql8:
container_name: mysql8
image: mysql:8
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: sasa
MYSQL_DATABASE: msvc_usuarios
volumes:
- data-mysql:/var/lib/mysql
restart: always
networks:
- spring
postgres14:
container_name: postgres14
image: postgres:14-alpine
ports:
- "5532:5432"
environment:
- POSTGRES_PASSWORD=sasa
- POSTGRES_DB=msvc_cursos
volumes:
- data-postgres:/var/lib/postgresql/data
restart: always
networks:
- spring
msvc-usuarios:
container_name: msvc-usuarios
# image: curenosm/usuarios:latest
build:
context: ./
dockerfile: ./msvc-usuarios/Dockerfile
# env_file: ./msvc-usuarios/.env
environment:
PORT: 8001
DB_HOST: mysql8:3306
DB_DATABASE: msvc_usuarios
DB_USERNAME: root
DB_PASSWORD: sasa
CURSOS_URL: msvc-cursos:8002
ports:
- "8001:8001"
depends_on:
- mysql8
networks:
- spring
restart: always
msvc-cursos:
container_name: msvc-cursos
image: curenosm/cursos:latest
build:
context: ./
dockerfile: ./msvc-cursos/Dockerfile
# env_file: ./msvc-cursos/.env
environment:
PORT: 8002
DB_HOST: postgres14:5432
DB_DATABASE: msvc_cursos
DB_USERNAME: postgres
DB_PASSWORD: sasa
USUARIOS_URL: msvc-usuarios:8001
ports:
- "8002:8002"
depends_on:
- postgres14
- msvc-usuarios
networks:
- spring
restart: always
networks:
spring:
name: spring
volumes:
data-mysql:
name: data-mysql
data-postgres:
name: data-postgres