-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.yml
85 lines (83 loc) · 2.16 KB
/
app.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
78
79
80
81
82
83
84
85
---
components:
- name: WordPress
type: service
image: wordpress:6.4.1-php8.2-apache
port: 80
build: &buildwp
steps:
- directory: /usr/src/wordpress
- run: find /etc/apache2 -name '*.conf' -type f -exec sed -ri -e "s!/var/www/html!/usr/src/wordpress/web!g" -e "s!Directory /var/www/!Directory /usr/src/wordpress/web!g" '{}' +
- copy: bin/
- run: sh bin/install-composer.sh
- run: sh bin/install-wpcli.sh
- run: apt update && apt install -y jq
- copy: wp-cli.yml
- copy: composer.json
- copy: composer.lock
- run: composer install
- copy: config/
- copy: web/
runtime: &runtimewp
resources:
- MySQLDatabase
- S3Bucket
variables:
STACK_ID:
$stack: id
APP_NAME:
$app: name
WP_ENV:
$env:
if:
- var: production
- production
- development
AWS_REGION:
$env: region
DB_HOST:
$resources: MySQLDatabase.host
DB_NAME:
$resources: MySQLDatabase.database
DB_USER:
$resources: MySQLDatabase.username
DB_PASSWORD:
$resources: MySQLDatabase.password
S3_UPLOADS_BUCKET:
$resources: S3Bucket.bucket
S3_UPLOADS_ENDPOINT:
$resources: S3Bucket.endpoint
S3_UPLOADS_REGION:
$env: region
- name: WordPressCron
type: task
image: curlimages/curl:latest
cron: '* * * * *'
runtime:
command: curl --fail-with-body http://localstack/wp/wp-cron.php
- name: SaltGenerator
type: task
image: stedolan/jq:latest
build:
steps:
- copy: bin/salts.sh
destination: /tmp/salts.sh
runtime:
entrypoint: ''
command: sh /tmp/salts.sh
- name: WordPressInstaller
type: task
image: wordpress:6.4.1-php8.2-apache
build: *buildwp
runtime:
<<: *runtimewp
command: sh -c bin/install-wordpress.sh
entrypoint: ''
routes:
- target:
component: WordPress
resources:
- name: MySQLDatabase
type: mysql
- name: S3Bucket
type: s3