-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
stackup.dist.yaml
73 lines (62 loc) · 2.09 KB
/
stackup.dist.yaml
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
name: my stack
description: laravel application stack
version: 1.0.0
env:
- MY_ENV_VAR_ONE=test1234
- dotenv://vault
settings:
exit-on-checksum-mismatch: false
dotenv: ['.env', '.env.local']
checksum-verification: false
cache:
ttl-minutes: 15
domains:
allowed:
- '*.githubusercontent.com'
hosts:
- hostname: api.github.com
gateway: allow
headers:
- 'Authorization: token $GITHUB_TOKEN'
- 'Accept: application/vnd.github.v3+json'
- hostname: '*.githubusercontent.com'
gateway: allow
headers:
- 'Authorization: token $GITHUB_TOKEN'
- 'Accept: application/vnd.github.v3+json'
defaults:
tasks:
silent: false
path: $LOCAL_BACKEND_PROJECT_PATH
includes:
- url: gh:permafrost-dev/stackup/main/templates/remote-includes/shared-settings.yaml
- url: gh:permafrost-dev/stackup/main/templates/remote-includes/containers.yaml
- url: gh:permafrost-dev/stackup/main/templates/remote-includes/laravel.yaml
- url: gh:permafrost-dev/stackup/main/templates/remote-includes/php.yaml
- url: gh:permafrost-dev/stackup/main/templates/remote-includes/node.yaml
init: |
vars.Set("run_migrations_taskId", "run-migrations-" + (hasFlag("seed") ? "fresh" : "no-seed"));
vars.Set("frontend_http_cmd", (platform() == "windows" ? "npm run dev" : "node ./node_modules/.bin/next dev"));
preconditions:
- name: environment variables exist and are not empty
check: |
hasEnv("FRONTEND_PROJECT_PATH") && hasEnv("LOCAL_BACKEND_PROJECT_PATH") &&
env("FRONTEND_PROJECT_PATH") != "" && env("LOCAL_BACKEND_PROJECT_PATH") != ""
- name: frontend project directory exists
check: fs.Exists($FRONTEND_PROJECT_PATH) && fs.IsDirectory($FRONTEND_PROJECT_PATH)
startup:
- task: start-containers
- task: '{{ $run_migrations_taskId }}'
shutdown:
- task: stop-containers
servers:
- task: frontend-httpd
- task: httpd
- task: horizon-queue
scheduler:
- task: run-artisan-scheduler
cron: '* * * * *'
tasks:
- id: frontend-httpd
path: $FRONTEND_PROJECT_PATH
command: '{{ $frontend_http_cmd }}'