-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
67 lines (62 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
version: '3'
volumes:
db_data:
logs:
driver: local
# docker-compose up -d
services:
# docker exec -ti slim-webserver php doctrine orm:schema-tool:update --force
db:
image: mysql:5.7
restart: always
container_name: slim-db
environment:
MYSQL_ROOT_PASSWORD: rootdockerpw
MYSQL_DATABASE: slim_skeleton
MYSQL_USER: dockeruser
MYSQL_PASSWORD: dockerpw
ports:
- 7706:3306
volumes:
- db_data:/var/lib/mysql
- ./sql/db-dump.sql:/docker-entrypoint-initdb.d/db-dump.sql
# http://localhost:7705
# docker exec -ti slim-webserver php --version
webserver:
#image: php:8.0-alpine
container_name: slim-webserver
restart: always
working_dir: /var/www
command: php -S 0.0.0.0:8080 -t public
environment:
docker: "true"
#APP_DB_HOST: db
APP_DB_PORT: 3306
APP_DB_NAME: slim_skeleton
APP_DB_USER: dockeruser
APP_DB_PASSWORD: dockerpw
#APP_DB_SOCKET: /Applications/MAMP/tmp/mysql/mysql.sock
build:
context: ./
dockerfile: Dockerfile
ports:
- 7705:8080
volumes:
- .:/var/www
- logs:/var/www/logs
depends_on:
- db
# http://localhost:7707
adminer:
image: adminer
container_name: slim-adminer
restart: always
ports:
- 7707:8080
# docker-compose run composer install --no-dev
# docker-compose run composer require user/pack
composer:
image: composer
volumes:
- .:/var/www
working_dir: /var/www