-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
62 lines (42 loc) · 1.15 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
version: '3'
services:
web:
build:
context: ./docker
dockerfile: ./php/Dockerfile
container_name: kk_webserver
depends_on:
- db
image: kk_webserver_img
# 5173 : Vite's default dev server port
ports:
- "80:80"
- "5173:5173"
volumes:
- ./src:/var/www/html
# make it easier to edit/update aliases
- ./docker/bash/:/root/bash
# preserve bash history
- ./docker/php/.bash_history:/root/.bash_history
db:
build:
context: ./docker
dockerfile: ./db/Dockerfile
container_name: kk_mysql
environment:
MYSQL_DATABASE: db_github
MYSQL_USER: koohii
MYSQL_PASSWORD: koohii
MYSQL_ROOT_PASSWORD: root
image: kk_mysql_img
ports:
- "3306:3306"
restart: always
volumes:
- ./mysql56:/var/lib/mysql
# sources to initialize development database
- ./docker/db/initdb.d:/docker-entrypoint-initdb.d
# make it easier to edit/update aliases
- ./docker/bash/:/root/bash
# preserve bash history
- ./docker/db/.bash_history:/root/.bash_history