-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (106 loc) · 3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
118 lines (106 loc) · 3 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP:-1000}'
container_name: ${DOCKER_CONTAINER_NAME}_app
working_dir: /var/www/html
volumes:
- .:/var/www/html
networks:
- devituz
environment:
APP_ENV: local
WWWUSER: '${WWWUSER:-1000}'
XDEBUG_MODE: '${XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${XDEBUG_CONFIG:-client_host=host.docker.internal}'
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- pgsql
- redis
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: ${DOCKER_CONTAINER_NAME}_nginx
ports:
- '${APP_PORT:-8000}:80'
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
volumes:
- .:/var/www/html
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- app
networks:
- devituz
restart: unless-stopped
queue:
build:
context: .
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP:-1000}'
container_name: ${DOCKER_CONTAINER_NAME}_queue
command: php artisan queue:work
volumes:
- .:/var/www/html
networks:
- devituz
depends_on:
- pgsql
- redis
restart: unless-stopped
pgsql:
image: postgres:17
container_name: ${DOCKER_CONTAINER_NAME}_pgsql
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- pgsql-data:/var/lib/postgresql/data
networks:
- devituz
restart: unless-stopped
redis:
image: redis:alpine
container_name: ${DOCKER_CONTAINER_NAME}_redis
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
- redis-data:/data
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
networks:
- devituz
restart: unless-stopped
migration:
build:
context: .
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP:-1000}'
container_name: ${DOCKER_CONTAINER_NAME}_migration
command: |
bash -c "php artisan migrate --seed && php artisan storage:link"
depends_on:
- app
- pgsql
- redis
networks:
- devituz
environment:
APP_ENV: local
volumes:
- .:/var/www/html
restart: unless-stopped
volumes:
pgsql-data:
redis-data:
networks:
devituz:
driver: bridge