-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
64 lines (60 loc) · 1.5 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
60
61
62
63
64
version: "3.5"
services:
blog-lumen:
image: aronnebrivio/php:8.0-dev
container_name: blog-lumen
environment:
- XDEBUG_MODE=${XDEBUG_MODE}
user: "www-data:www-data"
volumes:
# code
- .:/var/www/html:cached
# container /tmp folder, used for profiler and other stuff
- ./private/tmp:/tmp:delegated
ports:
- ${PHP_HOST_PORT}:80
networks:
backend:
aliases:
- blog-lumen
blog-db:
image: mysql:8
# Set DB_HOST variable in .env file to this value to use local environment
container_name: blog-db
# needed as of mysql 8
command: --default-authentication-plugin=mysql_native_password
volumes:
# The db files are stored in this named volume
- blog-db-data:/var/lib/mysql:delegated
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
ports:
- ${MYSQL_HOST_PORT}:3306
networks:
backend:
aliases:
- blog-db
blog-redis:
image: redis
container_name: blog-redis
volumes:
# The db files are stored in this named volume
- blog-redis-data:/data:delegated
environment:
- REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
- REDIS_DATABASE=${REDIS_DATABASE}
ports:
- ${REDIS_HOST_PORT}:${REDIS_PORT}
networks:
backend:
aliases:
- blog-redis
volumes:
blog-db-data:
driver: local
blog-redis-data:
driver: local
networks:
backend:
name: blog-network