-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (72 loc) · 1.73 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
71
72
73
74
75
76
77
78
version: '3'
services:
# PHP Service
codeigniter3-app:
image: nguyenanhung/php80-fpm-alpine
container_name: codeigniter3-app
restart: unless-stopped
tty: true
environment:
SERVICE_NAME: app
SERVICE_TAGS: dev
working_dir: /var/www
volumes:
- ./:/var/www
- ./docker/php/local.ini:/usr/local/etc/php/conf.d/local.ini
- ./docker/php/opcache.ini:/usr/local/etc/php/conf.d/opcache.ini
networks:
- codeigniter3-app-network
# NGINX Service
codeigniter3-webserver:
image: nginx:alpine
container_name: codeigniter3-webserver
restart: unless-stopped
tty: true
ports:
- "80:80"
- "443:443"
volumes:
- ./:/var/www
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
networks:
- codeigniter3-app-network
# MySQL Service
codeigniter3-mariadb:
image: mariadb:latest
container_name: codeigniter3-mariadb
hostname: mariadb
restart: unless-stopped
tty: true
ports:
- "33060:3306"
environment:
MYSQL_ROOT_PASSWORD: hungna
volumes:
- codeigniter3-db-data:/var/lib/mysql
- ./docker/mariadb/mariadb.cnf:/etc/mysql/mariadb.cnf
networks:
- codeigniter3-app-network
# PHP MyAdmin Service
codeigniter3-phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: codeigniter3-phpmyadmin
restart: unless-stopped
depends_on:
- codeigniter3-mariadb
environment:
- PMA_HOST=mariadb
- PMA_PORT=3306
- PMA_USER=root
- PMA_PASSWORD=hungna
ports:
- "3380:80"
networks:
- codeigniter3-app-network
#Docker Networks
networks:
codeigniter3-app-network:
driver: bridge
#Volumes
volumes:
codeigniter3-db-data:
driver: local