-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (56 loc) · 1.42 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
---
version: '3.8'
services:
base-php:
&base-php
platform: linux/x86_64
env_file: .env
build:
context: .
dockerfile: docker/php/Dockerfile
command: [ "true" ]
composer-install:
<<: *base-php
volumes:
- ./apps:/usr/src/app
command: [ "php-fpm" ]
profiles: [ "composer" ]
php:
<<: *base-php
volumes:
- './apps/back:/usr/src/app'
- '.env:/usr/src/app/.env'
restart: unless-stopped
command: [ "php-fpm" ]
depends_on:
db:
condition: service_healthy
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=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
adminer:
image: adminer
restart: unless-stopped
ports:
- 8080:8080
volumes:
db: