forked from only-for-testing/Challenge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (64 loc) · 1.28 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
version: '3.8'
services:
# MySQL service for database
db:
image: mysql:5.7
container_name: db
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: bookapi
volumes:
- db_data:/var/lib/mysql
networks:
- my_network
ports:
- "3306:3306"
# Laravel API service
api:
build:
context: ./api
dockerfile: Dockerfile
container_name: api
environment:
DB_HOST: db
DB_DATABASE: bookapi
DB_PORT: 3306
DB_USERNAME: app
DB_PASSWORD: password
depends_on:
- db
networks:
- my_network
ports:
- "8000:8000"
# Nuxt.js client service
client:
build:
context: ./client
dockerfile: Dockerfile
container_name: client
environment:
API_URL: http://api:8000
networks:
- my_network
ports:
- "3000:3000"
# Nginx reverse proxy service
nginx:
image: nginx:latest
container_name: nginx
volumes:
- ./nginx.conf/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/ssl:/etc/nginx/ssl # نشر الشهادات إلى الحاوية
networks:
- my_network
depends_on:
- client
ports:
- "80:80"
- "443:443"
networks:
my_network:
driver: bridge
volumes:
db_data: