-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-loc.yaml
74 lines (74 loc) · 2.07 KB
/
docker-compose-loc.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: '3.8'
services:
web:
container_name: laravel-api-web
restart: always
build:
context: .
dockerfile: ./.docker/web.loc/Dockerfile
environment:
TZ: 'Asia/Tashkent'
PHP_IDE_CONFIG: "serverName=localhost"
PHP_MEMORY_LIMIT: "2048M"
volumes:
- '.:/var/www/'
- './.docker/web.loc/supervisord.conf:/etc/supervisord.conf'
- './.docker/web.loc/nginx.conf:/etc/nginx/nginx.conf'
- './.docker/web.loc/app.conf:/etc/nginx/conf.d/default.conf'
- './.docker/web.loc/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf'
- './storage/app/public:/var/www/storage/app/public'
- './storage/app/public/uploads:/var/www/storage/app/public/uploads'
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-80}:80'
networks:
- 'laravel-api-network'
depends_on:
- mariadb
- redis
mariadb:
container_name: laravel-api-database
restart: always
image: 'mariadb:10'
ports:
- '${FORWARD_DB_PORT:-3307}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
TZ: 'Asia/Tashkent'
volumes:
- '${DATABASE_PATH:-/etc/docker/laravel-api/laravel-api-database:/var/lib/mysql}'
networks:
- 'laravel-api-network'
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}" ]
retries: 3
timeout: 5s
redis:
container_name: laravel-api-redis
restart: always
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6380}:6379'
environment:
TZ: 'Asia/Tashkent'
volumes:
- '/etc/docker/laravel-api/laravel-api-redis:/data'
networks:
- 'laravel-api-network'
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
retries: 3
timeout: 5s
networks:
laravel-api-network:
driver: bridge
volumes:
laravel-api-database:
driver: local
laravel-api-redis:
driver: local