-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
144 lines (135 loc) · 3.95 KB
/
compose.dev.yaml
File metadata and controls
144 lines (135 loc) · 3.95 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
services:
web:
image: nginx:latest # Using the default Nginx image with custom configuration.
volumes:
# Mount the application code for live updates
- ./:/var/www
# Mount the Nginx configuration file
- ./docker/development/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
# Map port 80 inside the container to the port specified by 'NGINX_PORT' on the host machine
- "80:80"
environment:
- NGINX_HOST=localhost
networks:
- laravel-development
depends_on:
php-fpm:
condition: service_started # Wait for php-fpm to start
php-fpm:
# For the php-fpm service, we will create a custom image to install the necessary PHP extensions and setup proper permissions.
build:
context: .
dockerfile: ./docker/common/php-fpm/Dockerfile
target: development
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
XDEBUG_ENABLED: ${XDEBUG_ENABLED:-true}
XDEBUG_MODE: develop,coverage,debug,profile
XDEBUG_HOST: ${XDEBUG_HOST:-host.docker.internal}
XDEBUG_IDE_KEY: ${XDEBUG_IDE_KEY:-DOCKER}
XDEBUG_LOG: /dev/stdout
XDEBUG_LOG_LEVEL: 0
env_file:
# Load the environment variables from the Laravel application
- .env.docker
user: "${UID:-1000}:${GID:-1000}"
volumes:
# Mount the application code for live updates
- ./:/var/www
networks:
- laravel-development
depends_on:
mysql:
condition: service_started # Wait for mysql to start
workspace:
# For the workspace service, we will also create a custom image to install and setup all the necessary stuff.
build:
context: .
dockerfile: ./docker/development/workspace/Dockerfile
args:
UID: ${UID:-1000}
GID: ${GID:-1000}
XDEBUG_ENABLED: ${XDEBUG_ENABLED:-true}
XDEBUG_MODE: develop,coverage,debug,profile
XDEBUG_HOST: ${XDEBUG_HOST:-host.docker.internal}
XDEBUG_IDE_KEY: ${XDEBUG_IDE_KEY:-DOCKER}
XDEBUG_LOG: /dev/stdout
XDEBUG_LOG_LEVEL: 0
ports:
- '${VITE_PORT:-5173}:5173'
tty: true # Enables an interactive terminal
stdin_open: true # Keeps standard input open for 'docker exec'
env_file:
- .env.docker
volumes:
- ./:/var/www
networks:
- laravel-development
depends_on:
mysql:
condition: service_started
redis:
condition: service_started
mysql:
image: mysql:8.0
ports:
- "${MYSQL_PORT:-3306}:3306"
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: platformio
MYSQL_USER: laravel
MYSQL_PASSWORD: secret
volumes:
- mysql-data-development:/var/lib/mysql
networks:
- laravel-development
redis:
image: redis:alpine
ports:
- "6379:6379"
volumes:
- redis-data-development:/data
networks:
- laravel-development
# ---------------------------------------------------------
# CUSTOM SERVICES FOR MONOLITHIC NEXTCLOUD ALTERNATIVE
# ---------------------------------------------------------
reverb:
# We reuse the exact same PHP image as php-fpm to ensure pcntl is available
build:
context: .
dockerfile: ./docker/common/php-fpm/Dockerfile
target: development
command: php artisan reverb:start --host="0.0.0.0" --port=8080
ports:
- "8080:8080"
env_file:
- .env.docker
volumes:
- ./:/var/www
networks:
- laravel-development
depends_on:
redis:
condition: service_started
mysql:
condition: service_started
python_ai:
build:
context: ./python_services
dockerfile: dockerfile
command: python ai_worker.py
env_file:
- .env.docker
networks:
- laravel-development
depends_on:
redis:
condition: service_started
networks:
laravel-development:
volumes:
mysql-data-development:
redis-data-development: # Added to persist Redis cache/queues