-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (50 loc) · 1.36 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
---
version: '3.8'
services:
php:
platform: linux/x86_64
build:
context: .
dockerfile: docker/php/Dockerfile
target: php-fpm
volumes:
- './apps/back:/usr/src/app'
restart: unless-stopped
command: [ "php-fpm" ]
depends_on:
db:
condition: service_healthy
environment:
APP_ENV: dev
APP_SECRET: changeme
APP_URL: "http://localhost"
DATABASE_URL: "mysql://user:password@db:3306/database?serverVersion=8.0.32&charset=utf8mb4"
nginx:
image: nginx:1.21.3-alpine
ports:
- 80:80
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./apps/back/public:/usr/src/app/public
restart: unless-stopped
db:
image: mysql:8.0.32
restart: unless-stopped
volumes:
- db:/var/lib/mysql
healthcheck:
test: [ CMD, mysqladmin, ping, --silent ]
ports:
- 3306:3306
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_DATABASE=database
- MYSQL_USER=user
- MYSQL_PASSWORD=password
adminer:
image: adminer
restart: unless-stopped
ports:
- 8080:8080
volumes:
db: