-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathdocker-compose.yml
66 lines (61 loc) · 1.72 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
version: '3.9'
networks:
new_mvc_shop:
driver: bridge
services:
server:
# build:
# context: .
# dockerfile: ./docker/Dockerfile
# args:
# - PHP_VERSION_SELECTED=${PHP_VERSION_SELECTED:-8.2}
image: tanhong/new-mvc-shop
container_name: '${APP_NAME:-new_mvc_shop}-server'
ports:
- '${APP_PORT:-85}:80'
- '${SSL_PORT:-445}:443'
working_dir: /var/www/html
environment:
- 'DATABASE_URL=mysql://${MYSQL_USER:-root}:${MYSQL_PASS:-root}@db_server:3306/${MYSQL_DB:-new_mvc_shop_db}'
volumes:
- ./:/var/www/html
- ./docker/sites-available:/etc/apache2/sites-available
- ./docker/php/php.ini:/usr/local/etc/php/conf.d/extra-php-config.ini
- ./docker/certs:/var/www/certs
- ./docker/logs:/var/www/logs
depends_on:
- db_server
networks:
- new_mvc_shop
db_server:
build:
context: .
dockerfile: ./docker/db/Dockerfile
# image: mariadb
container_name: '${APP_NAME:-new_mvc_shop}-db'
restart: always
ports:
- '${MYSQL_PORT:-13306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASS:-root}'
MYSQL_USER: '${MYSQL_USER:-root}'
MYSQL_PASSWORD: '${MYSQL_PASS:-root}'
MYSQL_DATABASE: '${MYSQL_DB:-new_mvc_shop_db}'
volumes:
- db_data:/var/lib/mysql
- ./admin/database:/var/lib/mysql/sql
networks:
- new_mvc_shop
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: ${APP_NAME:-new_mvc_shop}-phpmyadmin
restart: always
ports:
- '${PHPMYADMIN_PORT:-9011}:${APP_PORT:-85}'
environment:
PMA_HOST: db_server
UPLOAD_LIMIT: ${PHPMYADMIN_UPLOAD_LIMIT:-1024M}
networks:
- new_mvc_shop
volumes:
db_data: