-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (67 loc) · 1.54 KB
/
docker-compose.yml
File metadata and controls
70 lines (67 loc) · 1.54 KB
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
60
61
62
63
64
65
66
67
68
69
70
version: "3.7"
services:
app:
build:
args:
user: sammy
uid: 1000
context: ./
dockerfile: Dockerfile
image: bookingapp
container_name: booking-app
restart: unless-stopped
working_dir: /var/www/
volumes:
- ./:/var/www
networks:
- bookingapp
db:
image: mysql:5.7.32
container_name: bookingapp-db
restart: unless-stopped
ports:
- ${DB_PORT}:3306
command: --innodb_use_native_aio=0
environment:
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_ALLOW_EMPTY_PASSWORD: 1
SERVICE_TAGS: dev
SERVICE_NAME: mysql
volumes:
- ./docker/mysql:/docker-entrypoint-initdb.d
- ${MYSQL_DATA_DIR-./storage/data/mysql}:/var/lib/mysql
- ${MYSQL_LOG_DIR-./storage/logs/mysql}:/var/log/mysql
networks:
- bookingapp
nginx:
image: nginx:alpine
container_name: bookingapp-nginx
restart: unless-stopped
ports:
- 8000:80
volumes:
- ./:/var/www
- ./docker/nginx:/etc/nginx/conf.d/
networks:
- bookingapp
redis:
image: redis:latest
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- ./docker/redis:/data
restart: unless-stopped
ports:
- "${REDIS_PORT}:6379"
networks:
- bookingapp
healthcheck:
test: [ "CMD","redis-cli","ping" ]
interval: 600s
timeout: 10s
retries: 5
networks:
bookingapp:
driver: bridge