-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.34 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
version: "3.3"
services:
php_api:
container_name: rgr_api
build:
context: .
dockerfile: ./docker/php/Dockerfile
restart: unless-stopped
ports:
- "8040:8040"
- "9040:9001"
volumes:
- .:/app:delegated
#command: symfony serve --dir=apps/api/public --port=8040 --force-php-discovery
command: symfony serve --port=8040 --force-php-discovery
networks:
- app
mysql:
container_name: rgr_api_bbdd
image: mysql:8.0
restart: always
environment:
MYSQL_DATABASE: 'api'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'password'
MYSQL_ROOT_PASSWORD: "root"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
command: [ "--default-authentication-plugin=mysql_native_password" ]
ports:
# <Port exposed> : < MySQL Port running inside container>
- '3306:3306'
expose:
# Opens port 3306 on the container
- '3306'
# Where our data will be persisted
volumes:
- mysql_ddbb:/var/lib/mysql
healthcheck:
test: [ "CMD", "mysqladmin", "--user=user", "--password=password", "--host=127.0.0.1", "ping", "--silent" ]
interval: 2s
timeout: 10s
retries: 10
networks:
- app
# Names our volume
volumes:
mysql_ddbb:
#Docker Networks
networks:
app:
driver: bridge