This repository has been archived by the owner on Mar 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (75 loc) · 2.14 KB
/
docker-compose.yml
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
version: '3.3' # specify docker-compose version
# Define the services/containers to be run
services:
angular: # name of the service
build: angular-client # specify the directory of the Dockerfile
hostname: frontend-client
volumes:
- ./angular-client:/usr/src/app
working_dir: /usr/src/app
ports:
- "4201:4200" # specify port forewarding
depends_on:
- auth-service-python
- movie-service-python
- catalog-service
links:
- auth-service-python
- movie-service-python
- catalog-service
auth-service-python: #name of the service
build: auth-server-python # specify the directory of the Dockerfile
hostname: auth-python
ports:
- "5001:5001" #specify ports forewarding
links:
- db_auth
depends_on:
- db_auth
catalog-service: #name of the service
build: catalog-server # specify the directory of the Dockerfile
hostname: catalog-host
ports:
- "6001:6001" #specify ports forewarding
volumes:
- ./catalog/img:/catalog/img
- ./catalog/movies:/catalog/movies
movie-service-python: #name of the service
build: ./movie-server-python # specify the directory of the Dockerfile
hostname: movie-service-python
ports:
- "5000:5000" #specify ports forewarding
links: #specify communication with another containers
- db_movies
depends_on:
- db_movies
db_movies:
image: mysql:latest
container_name: moviesDB
volumes:
- ./dbMovieData:/var/lib/mysql
- ./create_db_movies:/docker-entrypoint-initdb.d/
restart: always
ports:
- "3308:3306"
hostname: db-movie
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: MOVIES_DB
MYSQL_USER: admin
MYSQL_PASSWORD: admin
db_auth:
image: mysql:latest
container_name: authDB
volumes:
- ./dbAuth:/var/lib/mysql
- ./create_db_auth:/docker-entrypoint-initdb.d/
restart: always
ports:
- "3307:3306"
hostname: db-auth
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_DATABASE: auth
MYSQL_USER: admin
MYSQL_PASSWORD: admin