-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (54 loc) · 1.2 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
# This file is used to configure the docker containers for LaynelCMS
version: '3'
services:
laynelcms:
build:
context: .
dockerfile: ./docker/fastapi
ports:
- "80:80"
volumes:
-./:/var/www/html/
environment:
- DB_HOST=mysql
- DB_NAME=laynelcms
- DB_USER=root
- DB_PASSWORD=root
depends_on:
- mysql
nextjs:
build:
context: .
dockerfile: ./docker/nextjs
ports:
- "3000:3000"
volumes:
- ./:/var/www/html/
environment:
- DB_HOST=mysql
- DB_NAME=laynelcms
- DB_USER=root
- DB_PASSWORD=root
depends_on:
- mysql
mysql:
image: mysql:5.7
environment:
- MYSQL_DATABASE=laynelcms
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- MYSQL_ROOT_PASSWORD=root
volumes:
-./mysql:/var/lib/mysql
ports:
- "3306:3306"
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
-./:/var/www/html/
-./nginx.conf:/etc/nginx/conf.d/default.conf
depends_on:
- laynelcms
# The above code will create a docker container for LaynelCMS with MySQL and Nginx.