-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
64 lines (58 loc) · 1.59 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.8'
services:
app:
container_name: dockerize-laravel-app
build: docker/php/.
volumes:
- '.:/srv/app'
command: ["webapp", "php artisan serve --host=0.0.0.0 --port=8000"]
depends_on:
- mysql
networks:
- dockerize-laravel
nginx:
container_name: dockerize-laravel-nginx
image: 'nginx:1.23.3-alpine'
depends_on:
- app
networks:
- dockerize-laravel
ports:
- '80:80'
- '443:443'
volumes:
- './docker/nginx/conf.d:/etc/nginx/conf.d:ro'
- './:/srv/app:ro'
mysql:
image: mysql:8.0.32
container_name: dockerize-laravel-mysql
ports:
- '3306:3306'
env_file:
- ./.env
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
networks:
- dockerize-laravel
volumes:
- dockerize-laravel-db-data:/var/lib/postgresql/data
redis:
image: redis:7.0.8-alpine3.17
container_name: dockerize-laravel-redis
ports:
- '6379:6379'
volumes:
- dockerize-laravel-redis-data:/data
networks:
- dockerize-laravel
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
volumes:
dockerize-laravel-db-data: {}
dockerize-laravel-redis-data: {}
networks:
dockerize-laravel:
driver: bridge