forked from JhumanJ/OpnForm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (66 loc) · 1.42 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
---
services:
php-cli:
build:
dockerfile: './php-cli.Dockerfile'
entrypoint: [ 'php' ]
volumes:
- '.:/project'
working_dir: '/project'
user: '1000'
node-cli:
image: 'node:16'
volumes:
- '.:/project'
working_dir: '/project'
user: '1000'
composer-cli:
build:
dockerfile: './php-cli.Dockerfile'
entrypoint: [ 'composer' ]
volumes:
- '.:/project'
working_dir: '/project'
user: '1000'
composer-install:
extends:
service: composer-cli
command: [ 'install' ]
npm-install:
extends:
service: node-cli
entrypoint: [ 'npm' ]
command: [ 'clean-install' ]
npm-build:
extends:
service: node-cli
entrypoint: [ 'npm', 'run' ]
command: [ 'build' ]
database:
image: 'postgres:15'
restart: 'unless-stopped'
env_file: '.env.docker'
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready', '-d', 'postgres' ]
start_period: 5s
interval: 5s
timeout: 10s
retries: 3
migrate:
extends:
service: php-cli
depends_on:
database:
condition: service_healthy
env_file: '.env.docker'
command: [ 'artisan', 'migrate' ]
server:
extends:
service: php-cli
depends_on:
migrate:
condition: service_completed_successfully
env_file: '.env.docker'
command: [ '-S', '0.0.0.0:4000', '-t', './public']
ports:
- '4000:4000'