-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (84 loc) · 2.32 KB
/
docker-compose.yml
File metadata and controls
86 lines (84 loc) · 2.32 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
74
75
76
77
78
79
80
81
82
83
84
85
version: '3'
services:
redis-server:
image: "redis:alpine"
hostname: redis
ports:
- "6379:6379"
################################
# Setup react js container
################################
web:
container_name: "petsbnb_webapp"
build:
context: ../petsbnb_rework # make sure you downloaded the project and put the directory at the same root of this project
dockerfile: Dockerfile
expose:
- 3000
ports:
- 3000:3000
volumes:
- ../petsbnb_rework/:/app
stdin_open: true # docker run -i
nginx:
container_name: api-gateway
#image: nginx-api
build:
context: ./nginx
dockerfile: Dockerfile
restart: always
ports:
- 4200:4200
- 433:433
depends_on:
- spring-boot-jpa-app
links:
- spring-boot-jpa-app
mysql-docker-container:
container_name: mysql-docker-container
image: mysql:5.7
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_NAME}
# already root user by default so just set the pass to avoid bug
#- MYSQL_PASSWORD=root
#- MYSQL_USER=root
ports:
- 2012:3306 # <host-port>:<container-port> means we can access to 127.0.0.1:2012 (thats database from docker on local machin)
volumes:
#- /data/mysql
# For test
- ./seed/dev:/docker-entrypoint-initdb.d
# For prod
#- ./seed/prod:/docker-entrypoint-initdb.d
spring-boot-jpa-app:
container_name: spring-boot-jpa-app
restart: always
# these variables refers to the .env file
image: ${DOCKER_REPOSITORY}:${TAG_DEV}${VERSION}
build:
context: ./
dockerfile: Dockerfile
depends_on:
- mysql-docker-container
ports:
- 4999:4999 # same as ports above, the api is accessible at 127.0.0.1:4999 (for postman)
volumes:
- /data/spring-boot-app
messagerie-service:
container_name: messagerie-service
depends_on:
- redis-server
environment:
- PORT=3200
- HOST=0.0.0.0
- WS_PORT=9999
- REDIS_SERVER_URL=${REDIS_SERVER_ENDPOINT} # refer to the redis-server service define in docker-compose.yml
- REDIS_PORT=6379
ports:
- 3200:3200
- 9999:9999 # WS
build:
context: ./microservices/messagerie-service/
dockerfile: Dockerfile
restart: always