-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
59 lines (59 loc) · 1.19 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
58
59
version: "3"
services:
nginx:
image: nginx:latest
container_name: "nginx"
ports:
- "8181:80"
volumes:
- .:/app
- ./conf/:/etc/nginx/conf.d/
depends_on:
- api-service
networks:
- caching
api-service:
image: "php-redis:latest"
container_name: "pusri-api"
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:9000"
volumes:
- .:/app
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
networks:
- caching
db:
image: mariadb:10.5.8
restart: unless-stopped
container_name: pusri-db
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: test_store
MYSQL_ROOT_PASSWORD: root
volumes:
- ./mysql/:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
networks:
- caching
redis:
image: 'redis:alpine'
container_name: redis
command: 'redis-server --requirepass secret'
ports:
- '6379:6379'
healthcheck:
test: ["CMD", "redis-cli", "-p", "6379", "ping"]
networks:
- caching
networks:
caching:
driver: bridge