-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
51 lines (48 loc) · 1.1 KB
/
docker-compose.yaml
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
services:
postgres:
image: postgres:alpine
restart: always
environment:
POSTGRES_USER: self-control-diary
POSTGRES_PASSWORD: self-control-diary
POSTGRES_DB: self-control-diary
ports:
- 5443:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U self-control-diary"]
interval: 5s
timeout: 5s
retries: 10
mysql:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: self-control-diary
MYSQL_USER: self-control-diary
MYSQL_PASSWORD: self-control-diary
ports:
- 3366:3306
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h localhost -u self-control-diary --password=self-control-diary"]
interval: 5s
timeout: 5s
retries: 10
php-fpm:
build: ./deploy
restart: always
volumes:
- .:/var/www:cached
links:
- postgres
- mysql
nginx:
image: nginx:latest
restart: always
volumes:
- ./deploy/nginx-hosts:/etc/nginx/conf.d/
- .:/var/www:cached
ports:
- 8080:80
links:
- php-fpm