forked from brunocaramelo/task-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·106 lines (100 loc) · 2.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·106 lines (100 loc) · 2.54 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
services:
database:
image: postgres:15
container_name: postgres-tasker-app
volumes:
- postgres15-data:/var/lib/postgresql/data:rw
ports:
- "5432:5432"
env_file:
- docker/docker-compose-env/database.env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
websocket-server:
build:
context: .
dockerfile: ./docker/php-cli/Dockerfile
image: tasker-websocket-app:v1.0
container_name: websocket-tasker
volumes:
- .:/app:rw
ports:
- "8182:8182"
command: ["php", "/app/artisan", "reverb:start", "--debug"]
env_file:
- docker/docker-compose-env/ws-application.env
links:
- cache
unit-tests:
build:
context: .
dockerfile: ./docker/php-cli/Dockerfile
image: tasker-unit-tests:v1.0
container_name: tasker-unit-tests
volumes:
- .:/app:rw
- ./docker/docker-compose-env/testing.env:/app/.env
command: >
sh -c "
php artisan config:clear &&
php artisan cache:clear &&
php artisan test --coverage
"
profiles: ["testing"]
cache:
image: redis:alpine
container_name: redis-tasker
command: ['redis-server', '--bind','0.0.0.0','--requirepass', 'testes','--port','6380']
volumes:
- redis-data:/data
ports:
- "6380:6380"
webserver:
build:
context: .
dockerfile: ./docker/webserver/dockerfile/webserver.dockerfile
container_name: webserver-boiler-plate
restart: on-failure
volumes:
- .:/app:rw
- ./docker/webserver/startup/startup.sh:/app/startup.sh
ports:
- 80:80
- 8003:8003
depends_on:
- database
- cache
- websocket-server
env_file:
- docker/docker-compose-env/application.env
links:
- database
- cache
- websocket-server
compiler:
build:
context: .
dockerfile: ./docker/compiler/dockerfile/compiler.dockerfile
container_name: compiler-tasks-maintances
working_dir: /app
env_file:
- docker/docker-compose-env/ws-application.env
volumes:
- .:/app:rw
command: >
sh -c "
composer install --optimize-autoloader &&
mkdir -p /app/build &&
npm install --ignore-engines &&
npm ci --ignore-engines --no-audit --no-fund &&
npm run build
"
profiles: ["compiler"]
volumes:
postgres15-data:
driver: local
redis-data:
driver: local