Skip to content

Commit 59a86b3

Browse files
qiaofeng1227github-actions[bot]
authored andcommitted
Create app project structure from template
1 parent 2f14d74 commit 59a86b3

File tree

10 files changed

+246
-0
lines changed

10 files changed

+246
-0
lines changed

apps/keep/.env

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
W9_REPO="wordpress"
2+
W9_DIST=community
3+
W9_VERSION="latest"
4+
5+
W9_POWER_PASSWORD="1PrMxExC45LsCT"
6+
7+
# Environments which for user settings when create application
8+
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
9+
W9_HTTP_PORT_SET=9001
10+
# W9_HTTPS_PORT_SET=9002
11+
# W9_DB_PORT_SET=3306
12+
# W9_SSH_PORT_SET=23
13+
W9_KEY_SET="dfsjdkjf77xjxcjcj"
14+
15+
#### -- Not allowed to edit below environments when recreate app based on existing data -- ####
16+
17+
W9_ID=keep
18+
19+
# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
20+
# Some container (e.g teleport) need HTTPS access, then need to set this pra
21+
W9_HTTP_PORT=80
22+
W9_HTTPS_PORT=81
23+
24+
W9_LOGIN_USER=admin
25+
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
26+
# this password can also use password file
27+
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
28+
W9_ADMIN_PATH="/wp-login"
29+
30+
# Container name's suffix must use one of the value
31+
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"
32+
33+
# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT
34+
# If have protocols, should be set it in the APP's ENV
35+
W9_URL=internet_ip:$W9_HTTP_PORT_SET
36+
# modifies W9_URL on init when it is true
37+
W9_URL_REPLACE=true
38+
39+
W9_NETWORK=websoft9
40+
41+
#### ----------------------------------------------------------------------------------------- ####
42+
43+
44+
# Below environment is created by this app
45+
46+
WORDPRESS_DB_HOST=$W9_ID-mariadb
47+
WORDPRESS_DB_USER=wordpress #if use postgresql, it need set to postgres
48+
WORDPRESS_DB_PASSWORD=$W9_POWER_PASSWORD
49+
WORDPRESS_DB_NAME=wordpress
50+
51+
52+
#W9_NAME=""
53+
#W9_RCODE=""

apps/keep/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
## Release
4+
### Fixes and Enhancements
5+

apps/keep/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# image: https://hub.docker.com/r/websoft9dev/discuzq
2+
3+
FROM ccr.ccs.tencentyun.com/discuzq/dzq:latest
4+
5+
LABEL org.opencontainers.image.authors="https://www.websoft9.com" \
6+
org.opencontainers.image.description="Application packaged by Websoft9" \
7+
org.opencontainers.image.source="https://github.com/Websoft9/docker-library/tree/main/apps/opencart" \
8+
org.opencontainers.image.title="OpenCart" \
9+
org.opencontainers.image.vendor="Websoft9 Inc." \
10+
org.opencontainers.image.version="4.0.1.1"
11+
12+
ENV DISCUZQ_MYSQL_HOST=mysql
13+
ENV DISCUZQ_MYSQL_USER=discuzq
14+
ENV DISCUZQ_MYSQL_PASSWORD=discuzq
15+
ENV DISCUZQ_MYSQL_DATABASE=discuzq
16+
ENV DISCUZQ_SITENAME=DiscuzQ
17+
18+
COPY cmd.sh /tmp
19+
RUN chmod +x /tmp/cmd.sh
20+
21+
CMD ["/tmp/cmd.sh"]

apps/keep/Notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Appname
2+
## FAQ

apps/keep/README.jinja2

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# {{trademark}} on Docker
2+
3+
This is an **Docker Compose solution** powered by [Websoft9](https://www.websoft9.com) based on Docker for {{trademark}}:
4+
5+
{% for ed in edition %}
6+
- {{ed.dist}}: {{ ed.version | join(', ') }}
7+
{% endfor %}
8+
9+
## System Requirements
10+
11+
The following are the minimal [recommended requirements]({{requirements.url}}):
12+
13+
* **RAM**: {{requirements.memory}} GB or more
14+
* **CPU**: {{requirements.cpu}} cores or higher
15+
* **Disk**: at least {{requirements.disk}} GB of free space
16+
* **bandwidth**: more fluent experience over 100M
17+
18+
## Install
19+
20+
You can install this {{trademark}} by [How to use it?](https://github.com/Websoft9/docker-library#how-to-use-it).
21+
22+
If you want use {{trademark}} with **Websoft9 Business Support** free, you can [subscribe {{trademark}}](https://www.websoft9.com/apps) on Cloud platform
23+
24+
## Documentation
25+
26+
[{{trademark}} Administrator Guide](https://support.websoft9.com/docs/{{name}}) powered by Websoft9

apps/keep/docker-compose.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# image,docs: https://hub.docker.com/_/wordpress/
2+
3+
services:
4+
5+
wordpress:
6+
image: $W9_REPO:$W9_VERSION
7+
container_name: $W9_ID
8+
restart: unless-stopped
9+
#This is for access host from container
10+
# extra_hosts: ["host.docker.internal:host-gateway"]
11+
# command: |
12+
# /bin/bash -c "ping -c 3 host.docker.internal"
13+
logging:
14+
driver: "json-file"
15+
options:
16+
max-file: "5"
17+
max-size: 10m
18+
deploy:
19+
resources:
20+
limits:
21+
memory: 5g
22+
cpus: '0.7'
23+
ports:
24+
- $W9_HTTP_PORT_SET:80
25+
env_file: .env
26+
volumes:
27+
- wordpress:/var/www/html
28+
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini
29+
30+
mariadb:
31+
image: mariadb:10.4
32+
container_name: $W9_ID-mariadb
33+
restart: unless-stopped
34+
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
35+
volumes:
36+
- mysql_data:/var/lib/mysql
37+
environment:
38+
MYSQL_DATABASE: $WORDPRESS_DB_NAME
39+
MYSQL_USER: $WORDPRESS_DB_USER
40+
MYSQL_PASSWORD: $W9_POWER_PASSWORD
41+
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD
42+
43+
volumes:
44+
wordpress:
45+
mysql_data:
46+
47+
networks:
48+
default:
49+
name: $W9_NETWORK
50+
external: true

apps/keep/src/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# About
2+
3+
This folder includes files mount to container and used by Websoft9
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
proxy_busy_buffers_size 512k;
2+
proxy_buffers 4 512k;
3+
proxy_buffer_size 256k;
4+
client_max_body_size 50m;
5+
# override default location /
6+
location / {
7+
add_header X-Served-By $host;
8+
proxy_set_header Host $host;
9+
proxy_set_header X-Forwarded-Scheme $scheme;
10+
proxy_set_header X-Forwarded-Proto $scheme;
11+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12+
proxy_set_header X-Real-IP $remote_addr;
13+
proxy_pass $forward_scheme://$server:$port$request_uri;
14+
proxy_set_header Upgrade $http_upgrade;
15+
proxy_set_header Connection upgrade;
16+
}
17+
18+
location /console {
19+
proxy_pass http://$server:8080;
20+
proxy_http_version 1.1;
21+
proxy_set_header Host $http_host;
22+
proxy_set_header X-Real-IP $remote_addr;
23+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
24+
proxy_set_header X-Forwarded-Proto $scheme;
25+
}
26+
27+
# for echo some useful information
28+
location / {
29+
default_type text/plain;
30+
return 200 'Hello World';
31+
}
32+
33+
location /oida/ {
34+
# this is the address and port of the ORDS installation
35+
proxy_pass http://127.0.0.1:8080/ords/;
36+
37+
# set Origin to blank to avoid Chrome problems with CORS
38+
proxy_set_header Origin "" ;
39+
40+
# pass along some header variables with the public host name/port/and so on
41+
proxy_set_header Host $host;
42+
proxy_set_header X-Forwarded-Host $host:$server_port;
43+
proxy_set_header X-Real-IP $remote_addr;
44+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
45+
proxy_set_header X-Forwarded-Proto $scheme;
46+
47+
# this reverse proxies any "location" headers being passed in the response
48+
proxy_redirect http://$host/ords/ https://$host/oida/;
49+
50+
# also tell cookies their public path
51+
proxy_cookie_path /ords/ /oida/;
52+
53+
# reverse proxy links included in response (ie from ORDS webservice)
54+
sub_filter_types application/json ;
55+
sub_filter http://$host/ords/ https://$host/oida/;
56+
sub_filter_once off;
57+
}

apps/keep/src/php_exra.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
file_uploads = On
2+
max_input_time = 800
3+
max_execution_time = 300
4+
memory_limit = 600M
5+
upload_max_filesize = 900M
6+
post_max_size = 900M
7+
max_file_uploads = 200
8+
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

apps/keep/variables.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "keep",
3+
"trademark": "Keep",
4+
"release": false,
5+
"fork_url": "https://github.com/keephq/keep",
6+
"version_from": "us-central1-docker.pkg.dev/keephq/keep/keep-api",
7+
"edition": [
8+
{
9+
"dist": "community",
10+
"version": [
11+
"latest"
12+
]
13+
}
14+
],
15+
"requirements": {
16+
"cpu": "2",
17+
"memory": "4",
18+
"disk": "10",
19+
"url": "https://www.keephq.dev/"
20+
}
21+
}

0 commit comments

Comments
 (0)