-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.example.yaml
67 lines (56 loc) · 1.41 KB
/
docker-compose.example.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
MACHINE_IP: <ip>
client_name: <client>
client_image: <client-image>
server_name: <server>
server_image: <server-image>
network: <network>
network_name: <network_name>
database_user: <user>
database_password: <password>
version: '3'
services:
nginx:
container_name: nginx
image: nginx
networks:
- {{ network }}
ports:
- '80:80'
volumes:
- ./templates:/etc/nginx/templates
mysql:
container_name: mysql
image: mariadb
networks:
- {{ network }}
environment:
MYSQL_USER: {{ database_user }}
MYSQL_ROOT_PASSWORD: {{ database_password }}
volumes:
- mysql:/var/lib/mysql
portfolio-server:
container_name: {{ server_name }}
build: .
image: {{ server_image }}
hostname: {{ server_name }}
networks:
- {{ network }}
environment:
DB_USER: {{ database_user }}
DB_PASSWORD: {{ database_password }}
portfolio-client:
container_name: {{ client_name }}
build: .
image: {{ client_image }}
networks:
- {{ network }}
ports:
- '3000:3000'
environment:
PORTFOLIO_API: http://{{ MACHINE_IP }}:80/api
networks:
{{ network }}:
name: {{ network_name }}
volumes:
mysql:
driver: local