forked from ushahidi/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
garden.yaml
136 lines (130 loc) · 2.96 KB
/
garden.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
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
---
kind: Project
name: platform
environments:
- name: ush-staging
variables:
ingress-hostname: platform-dev-${local.username}-api.staging.ush.zone
v2_db_host: mysql.v2-sample-db
v2_db_user: ushahidi
v2_db_pass: ushahidi
v2_db_db: ush_v2
providers:
- name: kubernetes
context: ush-staging-arare
namespace: platform-dev-${local.username}
buildMode: cluster-docker
clusterDocker:
enableBuildKit: true
setupIngressController: false
storage:
builder:
size: 10240
registry:
size: 5120
sync:
size: 5120
nfs:
storageClass: gp2
---
kind: Module
name: platform
type: container
dockerfile: Dockerfile
exclude:
- public
- httpdocs/storage
- vendor/**
- storage/passport/**
- garden_modules/**
- bin/**
- .garden/**
- garden.yaml
# include:
# - bin/release
# - bin/update
# - bin/ushahidi
hotReload:
sync:
- source: ./app/
target: /var/www/app/
- source: ./src/
target: /var/www/src/
services:
- name: api
ports:
- name: http
containerPort: 8080
command:
- /bin/bash
- /entrypoint.CES.sh
- start
ingresses:
- hostname: ${var.ingress-hostname}
path: /
port: http
env: &api_env
APP_KEY: SomeRandomKey!!!SomeRandomKey!!!
DOCKERIZE_TIMEOUT: 180s
DOCKERIZE_WAIT_FOR_mysql: tcp://mysql:3306
DOCKERIZE_WAIT_FOR_redis: tcp://redis:6379
ENABLE_NGINX: "true"
ENABLE_PHPFPM: "true"
ENABLE_PLATFORM_TASKS: "false"
RUN_PLATFORM_MIGRATIONS: "true"
DB_CONNECTION: mysql
DB_DATABASE: ushahidi
DB_HOST: mysql
DB_PORT: 3306
DB_USERNAME: ushahidi
DB_PASSWORD: ushahidi
REDIS_HOST: redis
REDIS_PORT: 6379
CACHE_DRIVER: redis
QUEUE_DRIVER: redis
healthCheck:
httpGet:
path: /api/v3/config
port: http
dependencies:
- mysql
- redis
tasks:
- name: test-integration
# optional variables:
# flags: handy examples -> --stop-on-failure, ...
# spec_filename: spec file to run tests from
artifacts:
- source: /tmp/task-log/*
env:
<<: *api_env
command:
- /bin/bash
- -c
- >-
. docker/common.sh ;
run_composer_install ;
(cd httpdocs/; php -S localhost:8000 -t . index.php &) ;
./bin/behat --strict --profile ci ${var.flags || ''} ${var.spec_filename || ''}
- name: import-v2
artifacts:
- source: /tmp/task-log/*
command:
- /bin/bash
- -c
- >-
set -x;
set;
composer install;
mkdir -p /tmp/task-log;
{ ./artisan import:ushahidiv2
--host ${local.env.V2_DB_HOST || var.v2_db_host || "mysql"}
--port ${local.env.V2_DB_PORT || var.v2_db_port || "3306"}
--user ${local.env.V2_DB_USER || var.v2_db_user || "ushahidi"}
--password ${local.env.V2_DB_PASS || var.v2_db_pass || "ushahidi"}
${local.env.V2_DB_DB || var.v2_db_db || "ush_v2"}
2>&1 | tee /tmp/task-log/import-v2.log ;}
env:
<<: *api_env
ARTISAN_LOG_CONSOLE: 1
timeout: 7200