forked from alfox70/Docker-LEMP-stack-for-Codeigniter-4
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·54 lines (51 loc) · 1.39 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
version: '3'
services:
web:
image: nginx:1.19-alpine
container_name: '${COMPOSE_PROJECT_NAME}-web'
ports:
- "80:80"
volumes:
- ./docker/nginx/conf.d:/etc/nginx/conf.d
- ./app:/app
depends_on:
- php
- phpmyadmin
php:
build:
context: .
dockerfile: ./docker/php/PHP.Dockerfile
container_name: '${COMPOSE_PROJECT_NAME}-php'
volumes:
- ./app:/app
- ./docker/php/php.ini:/usr/local/etc/php/php.ini
depends_on:
- db
db:
image: yobasystems/alpine-mariadb:10.5
container_name: '${COMPOSE_PROJECT_NAME}-db'
restart: 'always'
ports:
- "127.0.0.1:3306:3306"
volumes:
- ./dbdata:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: demo
MYSQL_USER: user
MYSQL_PASSWORD: user
phpmyadmin:
image: mhzawadi/phpmyadmin:latest
container_name: '${COMPOSE_PROJECT_NAME}-pma'
links:
- db
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_USER: root
PMA_PASSWORD: root
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: user
MYSQL_PASSWORD: user
ports:
- '8080:80'