forked from portabilis/i-educar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
77 lines (69 loc) · 1.49 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
65
66
67
68
69
70
71
72
73
74
75
76
77
x-php: &php
build:
context: docker/php
args:
PHP_VERSION: 8.3
COMPOSER_VERSION: 2.7
image: php:8.3-ieducar
pull_policy: never
working_dir: /var/www/ieducar
volumes:
- ./:/var/www/ieducar
links:
- postgres
- redis
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
environment:
CACHE_DRIVER: redis
REDIS_HOST: redis
DB_HOST: postgres
PGPASSWORD: ieducar
services:
php:
<<: *php
container_name: ieducar-php
command: tail -f /dev/null
depends_on: []
fpm:
<<: *php
container_name: ieducar-fpm
horizon:
<<: *php
container_name: ieducar-horizon
command: /var/www/ieducar/artisan horizon
restart: always
nginx:
container_name: ieducar-nginx
image: nginx:1.26-alpine
links:
- fpm
working_dir: /var/www/ieducar
volumes:
- ./:/var/www/ieducar
- ./docker/nginx:/etc/nginx/conf.d/
ports:
- ${DOCKER_NGINX_PORT:-80}:80
- ${DOCKER_NGINX_SSL_PORT:-443}:443
postgres:
container_name: ieducar-postgres
image: postgres:16-alpine
environment:
POSTGRES_DB: ieducar
POSTGRES_USER: ieducar
POSTGRES_PASSWORD: ieducar
volumes:
- postgres:/var/lib/postgresql/data
ports:
- ${DOCKER_POSTGRES_PORT:-5432}:5432
redis:
container_name: ieducar-redis
image: redis:7-alpine
restart: always
ports:
- ${DOCKER_REDIS_PORT:-6379}:6379
volumes:
postgres: