-
Notifications
You must be signed in to change notification settings - Fork 1k
/
docker-compose.yml
34 lines (34 loc) · 1.17 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
version: '3'
services:
database:
image: mysql:8.0
container_name: database
restart: always
environment:
- MYSQL_ROOT_PASSWORD=php-crud-api
- MYSQL_DATABASE=php-crud-api
- MYSQL_USER=php-crud-api
- MYSQL_PASSWORD=php-crud-api
#ports:
#- "33066:3306"
volumes:
- ./tests/fixtures/blog_mysql.sql:/docker-entrypoint-initdb.d/blog_mysql.sql
webserver:
container_name: webserver
build:
context: ./
environment:
#- PHP_CRUD_API_DRIVER=mysql
- PHP_CRUD_API_ADDRESS=database
#- PHP_CRUD_API_PORT=3306
#- PHP_CRUD_API_DATABASE=php-crud-api
#- PHP_CRUD_API_USERNAME=php-crud-api
#- PHP_CRUD_API_PASSWORD=php-crud-api
#- PHP_CRUD_API_DEBUG=1
- PHP_CRUD_API_MAPPING=abc_posts.abc_id=posts.id,abc_posts.abc_user_id=posts.user_id,abc_posts.abc_category_id=posts.category_id,abc_posts.abc_content=posts.content
ports:
- "8080:80"
depends_on:
- database
#volumes:
#- .:/php-crud-api:ro