-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (34 loc) · 970 Bytes
/
docker-compose.yml
File metadata and controls
39 lines (34 loc) · 970 Bytes
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
services:
frontend:
build: ./client
ports:
- "4173:4173"
server:
build:
context: ./server
dockerfile: Dockerfile
command: bash server/run.sh
restart: always
volumes:
- ./server:/var/www/server
ports:
- 8000:8000
env_file:
- ./server/.env
sql:
image: mysql:5.7
container_name: mysql-5.7
restart: always # always restart
environment:
MYSQL_DATABASE: 'test' # name of database
MYSQL_USER: 'sample' # sample is the name of user
MYSQL_PASSWORD: 'password' # password for sample user
MYSQL_ROOT_PASSWORD: 'password' # password for root user
ports:
- '3306:3306' # host port 3306 is mapper to docker port 3306
expose:
- '3306'
volumes:
- mysql-db:/var/lib/mysql
volumes:
mysql-db: