Skip to content

Commit f38f04b

Browse files
Merge pull request #1106 from Websoft9/dev
Dev
2 parents 1af9c22 + c25ae27 commit f38f04b

File tree

19 files changed

+343
-54
lines changed

19 files changed

+343
-54
lines changed
Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,62 @@
11
---
22
name: New docker compose request
33
about: Create new docker-compose this project
4-
title: 'complete docker-compose.yml for [appname]'
4+
title: 'Create docker-compose.yml project for [appname]'
55
labels: 'feature'
66
assignees: ''
77
---
88

9-
**What type of your feature request?**
9+
## Describe application with below format
10+
11+
```
12+
# application name
13+
name: "Websoft9"
14+
# URL of the software project's homepage
15+
website_url: "https://www.websoft9.com"
16+
# URL where the full source code of the program can be downloaded
17+
source_code_url: "https://gitlab.com/websoft9/websoft9"
18+
# a brief and concise statementthat presents the main points for this application, shorter than 10 characters
19+
summary: "Open source Application self-hosting platform"
20+
# description of what the software does, shorter than 250 characters, sentence case
21+
description: "GitOps-driven, multi-application hosting for cloud servers and home servers, one-click deployment of 200+ open source apps."
22+
# list of license identifiers, see https://opensource.org/licenses for the full list of licenses
23+
licenses:
24+
- LGPL-3.0
25+
# (optional, true/false, default true) whether this application have Docker image
26+
Docker_image: true
27+
# (optional) link to an interactive demo of the software
28+
demo_url: "https://www.websoft9.com/demo"
29+
```
30+
31+
## Assessment Checklist by repository owner
32+
33+
Before deveopment, repository owner should complete below Assessment:
34+
35+
- [ ] This application have **3** containers
36+
- [ ] official architecture research
37+
- [ ] Complete the Contentful data for
38+
- [ ] Create app project structure from template
39+
40+
41+
## Development Checklist by deveoper
42+
43+
Developer should develop this application's docker compose project at **Websoft9 Console** directly.
1044

1145
- [ ] official architecture research
12-
- [ ] test offcial docker
13-
- [ ] complete standardized expression
14-
- [ ] developer test and running
46+
- [ ] follow [standardized syntax](https://github.com/Websoft9/docker-library/blob/main/docs/code_owner.md)
1547
- [ ] specials and refers at notes.md/.env/docker-compose.yml
16-
- [ ] contentful
17-
- [ ] test at Appstore and nginx proxy testing
18-
- [ ] docs
19-
- [ ] siteurl or baseurl
20-
- [ ] more environments from or configuration file
48+
- [ ] test at Websoft9 Appstore and nginx proxy testing
49+
- [ ] check siteurl or baseurl
50+
- [ ] add official environments reference at .env
2151
- [ ] connetion URI
2252
- [ ] ports
2353
- [ ] credentials environment
2454
- [ ] i18n
25-
- [ ] other
55+
- [ ] commit RP to dev branch
56+
57+
## Production preparation by repository owner
58+
59+
- [ ] system test
60+
- [ ] docs
61+
- [ ] add Notes content to docs
62+
- [ ] publish to RC release

CONTRIBUTING.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,29 @@
22

33
From opening a bug report to creating a pull request: every contribution is appreciated and welcome.
44

5-
If you're planning to implement a new feature or change the docker-library repository, please [create an issue](https://github.com/websoft9/docker-library/issues/new/choose) first. This way we can ensure that your precious work is not in vain.
6-
7-
## Process
5+
If you're planning to implement a new feature or change this repository, please [create an issue](https://github.com/websoft9/docker-library/issues/new/choose) first. This way we can ensure that your precious work is not in vain.
6+
7+
## Quick start for contributing new application
8+
9+
Below is the steps for contributing new application:
10+
11+
1. Create issue by template **New docker compose request**
12+
2. Waiting for Maintainers/owner Assessment until it is completed.
13+
3. Install Websoft9 at your server or apply online development account from Websoft9
14+
4. SSH to develoment host machine and running below command
15+
```
16+
docker exec -it websoft9-apphub bash /websoft9/script/update_zip.sh --channel dev --package_name "media-dev.zip" --sync_to "/websoft9/media" && docker exec -it websoft9-apphub bash /websoft9/script/update_zip.sh --channel dev --package_name "library-dev.zip" --sync_to "/websoft9/library"
17+
```
18+
5. Login to Websoft9 Console and install this application from **App Store**
19+
6. Develop and test it by **[App compose](https://support.websoft9.com/en/docs/next/app-compose/)** at Websoft9 Console
20+
7. Complete your issue checklist
21+
8. Docker exec **websoft9-apphub** container and pull request to repository
22+
```
23+
# sample for your, --appid get from Websoft9 Console, it not appname
24+
docker exec -it websoft9-apphub apphub commit --appid "wordpress_o2qjz" --github_token "yourgithubtoken"
25+
```
26+
27+
## Process diagram
828

929
[Bug report flow](https://www.canva.cn/design/DAFrBuGNCNs/-WGd-D0mQHBu1eZM07d8vQ/edit) as following:
1030

@@ -14,30 +34,26 @@ If you're planning to implement a new feature or change the docker-library repos
1434

1535
![Alt text](./docs/image/feature_request_flow.png)
1636

17-
## Development
37+
## Development Specification
1838

1939
If you want to start to develop this repository, it is very useful for you to read [the develop documentation](docs/code_owner.md)
2040

21-
## Fork
22-
23-
Contributor only allow to fork [main branch](https://github.com/Websoft9/docker-library/tree/main) and pull request for it. Maintainers don't accept any pr to **production branch**
24-
2541
## Branch
2642

2743
This repository have these branchs:
2844

29-
- **Contributor's branch**: Develpoer can fork main branch as their delelopment branch anytime
30-
- **main branch**: The only branch that accepts PR from Contributors's branch
45+
- **dev branch**: Contributor only allow to fork [dev branch](https://github.com/Websoft9/docker-library/tree/dev) and pull request for it.
46+
- **main branch**: It is expected to contain code that is stable and ready for deployment.
3147

32-
Flow: Contributor's branch → main branch
48+
> Maintainers/owner don't accept any pr to **main branch** from developer directly.
3349
3450
## Pull request
3551

3652
[Pull request](https://docs.github.com/pull-requests) let you tell others about changes you've pushed to a branch in a repository on GitHub.
3753

3854
#### When is PR produced?
3955

40-
- Contributor commit to main branch
56+
- Contributor commit to dev branch
4157

4258
#### How to deal with PR?
4359

@@ -63,8 +79,8 @@ Websoft9 use below [Artifact](https://jfrog.com/devops-tools/article/what-is-a-s
6379

6480
### Tags
6581

66-
- Type tags: Bug, enhancement, Documetation
67-
- Stages Tags: PRD, Dev, QA(include deployment), Documentation
82+
- Type tags: RRD, Bug, enhancement, Documetation
83+
- Stages Tags: S-develop, S-fixed and all tags started with `S-`
6884

6985
### WorkFlow
7086

add_apps.json

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,14 @@
11
[
22
{
3-
"name": "aaaa1111",
4-
"trademark": "aaaa111",
3+
"name": "neko",
4+
"trademark": "Neko",
55
"release": false,
6-
"fork_url": "https://github.com/ONLYOFFICE/docker#recommended-system-requirements",
7-
"version_from": "",
6+
"fork_url": "https://github.com/m1k1o/neko",
7+
"version_from": "https://hub.docker.com/r/elestio/neko/tags",
88
"edition": [
99
{
1010
"dist": "community",
1111
"version": [
12-
"1.0",
13-
"latest"
14-
]
15-
}
16-
],
17-
"requirements": {
18-
"cpu": "2",
19-
"memory": "4",
20-
"disk": "1",
21-
"url": "https://github.com/onlyoffice/docker#recommended-system-requirements"
22-
}
23-
},
24-
{
25-
"name": "aaaa2222",
26-
"trademark": "aaaa222",
27-
"release": false,
28-
"fork_url": "https://github.com/ONLYOFFICE/docker#recommended-system-requirements",
29-
"version_from": "",
30-
"edition": [
31-
{
32-
"dist": "community",
33-
"version": [
34-
"1.2",
3512
"latest"
3613
]
3714
}

apps/neko/.env

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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=neko
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, http(s)://IP:PORT
34+
W9_URL=internet_ip:$W9_HTTP_PORT
35+
# modifies W9_URL on init when it is true
36+
W9_URL_REPLACE=true
37+
38+
W9_URL_WITH_PORT=false
39+
40+
W9_NETWORK=websoft9
41+
42+
#### ----------------------------------------------------------------------------------------- ####
43+
44+
45+
# Below environment is created by apphub
46+
47+
#W9_NAME=""
48+
#W9_RCODE=""

apps/neko/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/neko/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/neko/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/neko/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/neko/docker-compose.yml

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

apps/neko/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

0 commit comments

Comments
 (0)