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