Skip to content

feat: update wordpress samples #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
[package]
name = "wordpress"
edition = "0.5.0"
name = "wordpress-cloud-rds"
version = "0.1.0"

[dependencies]
catalog = { git = "https://github.com/KusionStack/catalog.git", tag = "0.1.0" }

catalog = { git = "https://github.com/KusionStack/catalog.git", tag = "0.1.2" }
[profile]
entries = ["main.k","platform.k"]
entries = ["main.k"]

38 changes: 38 additions & 0 deletions example/wordpress-cloud-rds/prod/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import catalog.models.schema.v1 as ac
import catalog.models.schema.v1.workload as wl
import catalog.models.schema.v1.workload.container as c
import catalog.models.schema.v1.workload.network as n
import catalog.models.schema.v1.accessories.mysql

# main.k declares customized configurations for prod stacks.
wordpress: ac.AppConfiguration {
workload: wl.Service {
containers: {
wordpress: c.Container {
image: "wordpress:6.3"
env: {
"WORDPRESS_DB_HOST": "$(KUSION_DB_HOST_WORDPRESS_MYSQL)"
"WORDPRESS_DB_USER": "$(KUSION_DB_USERNAME_WORDPRESS_MYSQL)"
"WORDPRESS_DB_PASSWORD": "$(KUSION_DB_PASSWORD_WORDPRESS_MYSQL)"
"WORDPRESS_DB_NAME": "mysql"
}
resources: {
"cpu": "500m"
"memory": "512Mi"
}
}
}
replicas: 1
ports: [
n.Port {
port: 80
}
]
}
database: {
wordpress: mysql.MySQL {
type: "cloud"
version: "8.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# The stack basic info
name: dev
name: prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The project basic info
name: wordpress
name: wordpress-cloud-rds
generator:
type: AppConfiguration
9 changes: 9 additions & 0 deletions example/wordpress-local-db/prod/kcl.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "wordpress-local-db"
version = "0.1.0"

[dependencies]
catalog = { git = "https://github.com/KusionStack/catalog.git", tag = "0.1.2" }
[profile]
entries = ["main.k"]

34 changes: 34 additions & 0 deletions example/wordpress-local-db/prod/main.k
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import catalog.models.schema.v1 as ac
import catalog.models.schema.v1.workload as wl
import catalog.models.schema.v1.workload.container as c
import catalog.models.schema.v1.workload.network as n
import catalog.models.schema.v1.accessories.mysql

# main.k declares customized configurations for prod stack.
wordpress: ac.AppConfiguration {
workload: wl.Service {
containers: {
wordpress: c.Container {
image: "wordpress:6.3"
env: {
"WORDPRESS_DB_HOST": "$(KUSION_DB_HOST_WORDPRESS_MYSQL)"
"WORDPRESS_DB_USER": "$(KUSION_DB_USERNAME_WORDPRESS_MYSQL)"
"WORDPRESS_DB_PASSWORD": "$(KUSION_DB_PASSWORD_WORDPRESS_MYSQL)"
"WORDPRESS_DB_NAME": "mysql"
}
}
}
replicas: 1
ports: [
n.Port {
port: 80
}
]
}
database: {
wordpress: mysql.MySQL {
type: "local"
version: "8.0"
}
}
}
2 changes: 2 additions & 0 deletions example/wordpress-local-db/prod/stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# The stack basic info
name: prod
4 changes: 4 additions & 0 deletions example/wordpress-local-db/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# The project basic info
name: wordpress-local-db
generator:
type: AppConfiguration
43 changes: 0 additions & 43 deletions example/wordpress/dev/main.k

This file was deleted.

14 changes: 0 additions & 14 deletions example/wordpress/dev/platform.k

This file was deleted.