<img src="public/brand.svg" width="360"/>
[简体中文](./README.zh-cn.md)
# Screenshots
for members ( who subscribe the plan )
![index](./_image/screen1.png)
![pricing](./_image/screen5.png)
![subscription](./_image/screen6.png)
for admin
![settings](./_image/screen2.png)
![members](./_image/screen3.png)
![plans](./_image/screen4.png)
![droplets](./_image/screen7.png)
⚠️ This document was translated into English by deepl and can be improved by PR
> An open source tool that lets you create SaaS websites from images in as
little as 10 minutes.
Docker2SaaS is a tool that enables multi-tenancy through virtualization
technology (calling cloud platform api ) with tenant management and subscription
managment. It helps web application and service developers to quickly build
websites for sale or subscription. All you need to do is make an image of your application and
then set up and configure a Docker2SaaS site to start selling your application as a service.
When a user's subscription is successful, it automatically creates a VPS from
the image as configured; when the user cancels the subscription and it expires,
it automatically deletes the VPS. Users can login to the site and see their
subscription, host IP information, and other details. Additional extensions can be
added.
The diagram below shows how Docker2SaaS interacts between:
End Users
Payment provider: Stripe
Cloud service provider: DigitalOcean.
![](./_image/mm1.png)
# Target Users of Docker2SaaS
Docker2SaaS is aimed at developers of cloud applications, providing them with a
solution to quickly monetize their applications.
Let's say you develop a nice little web app and open source it to Github.
Developers easily build it and use it on their own, but as the app becomes more
popular, so do non-technical users. But even if they have already made a docker
file, it is still difficult for them.
At this point you may want to provide a cloud hosting version. On the one hand,
you can solve the details of the build for non-technical users, and on the other
hand, hosting can bring some profit, so you can get a financial return.
However, this can create an additional amount of development, and it doesn't
seem wise to spend weeks on development before you know if cloud hosting will be
popular.
Fortunately, the open source Docker2SaaS solves this problem, and it only takes
ten minutes to configure and you can get a simple and usable cloud hosting sales
site. It's **immediately ready for early sales**, and you can modify the source code
to add more business-related features as user demand increases.
Of course, it can also be used to build a third-party sales site under the
license of a cloud application developer. But overall, Docker2SaaS is designed
for developers and does not take into account the experience of non-technical
users, so if you don't have a technical background, it's better to use a
Docker2SaaS site that someone else has built rather than building it yourself.
PS: Docker2SaaS is built on Laravel, and while no knowledge is required for a
simple deployment, if you want to customize and add features, then you need to
have a little Laravel development knowledge.
Docker2Saas is licensed under the GPLv2 with an additional non-compete clause.
## Docker2SaaS Guide
## Steps
![](./_image/mm2.png)
## Digital Ocean configuration
### Create a Digital Ocean image
We assume that you have already made a docker image of your application and can start it with the docker-compose command. Let's use Ghost as an example to explain.
First we will create a droplet( Digital Ocean calls its VPS droplet ) on Digital Ocean and select `docker on ubuntu` under `marketplace`.
![](./_image/2021-02-13/2021-02-13-23-19-50.png)
Then we log in to the newly created instance via SSH. Create our docker-compose.yaml file in the root directory (or somewhere else). Here we use the yaml provided by bitnami.
```yml
version: '2'
services:
mariadb:
restart: always
image: 'docker.io/bitnami/mariadb:10.3-debian-10'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_ghost
- MARIADB_DATABASE=bitnami_ghost
volumes:
- 'mariadb_data:/bitnami'
ghost:
restart: always
image: 'docker.io/bitnami/ghost:3-debian-10'
environment:
- MARIADB_HOST=mariadb
- MARIADB_PORT_NUMBER=3306
- GHOST_DATABASE_USER=bn_ghost
- GHOST_DATABASE_NAME=bitnami_ghost
- ALLOW_EMPTY_PASSWORD=yes
- GHOST_HOST=localhost
- GHOST_EMAIL=guest@ftqq.com
- GHOST_PASSWORD=admin
ports:
- '80:2368'
volumes:
- 'ghost_data:/bitnami'
depends_on:
- mariadb
volumes:
mariadb_data:
driver: local
ghost_data:
driver: local
```
Note that we have added `restart: always` to ensure that docker is started automatically when the image is started.
Once the file is created, go to droplet management and create a snapshot.
![](./_image/2021-02-13/2021-02-13-23-37-10.png)
When you are done creating the snapshot, you can delete the droplet instance.
Go to the images page and look up the data-id of the snapshot in the source code corresponding to the snapshot entry you just created, this value (78661121 in the image) is the id of the snapshot. Record it, and we'll use it later. (We'll call this A1)
![](./_image/2021-02-13/2021-02-13-23-45-41.png)
### Creating a Digital Ocean Token
Next we will create a token so that we can manage droplet through the API. At the bottom of the left menu, select API.
![](./_image/2021-02-13/2021-02-13-23-53-39.png)
In the Tokens/Keys tab, generate a new token with the read && write permissions selected.
Once generated, record it and you will need it later. (We'll call it A2)
## Stripe Configuration
The following are all described in Test mode.
### Create a subscription
Go to the Stripe dashboard and create a [product](https://dashboard.stripe.com/test/products/create).
Note that in the Pricing section, select Recurring so that it will automatically renew. Fill in the rest of the fields as you wish.
![](./_image/2021-02-13/2021-02-14-00-04-48.png)
After creating the product, go to the product details page, and you can see the API ID in the Pricing section, and record it. (We'll write it down as B1)
![](./_image/2021-02-13/2021-02-14-00-06-59.png)
You can create as many prices as you need, remember to record the price ids.
### Get API key
In order to interact with the Stripe platform through the API, we also need the API key. click the Developer menu on the left, select API Keys, and record the publishable key and secret key on the right. (Note B2, B3)
![](./_image/2021-02-13/2021-02-14-00-09-38.png)
Since then, the preparation is done.
## Configuring Docker2SaaS
### Site initialization
Download/clone the docker2saas source code to the environment where you want to run the sales site. This environment needs to be configured with PHP7.4+ and MySQL.
```bash
git clone https://gitlab.com/easychen/docker-2-saas.git --depth=1 docker2saas
```
Initialization of dependency packages:
```bash
cd docker2saas
composer install
```
Rename `.env.example` to `.env` and run the command to generate APP_KEY
```bash
php artisan key:generate
```
Fill in other relevant information.
1. APP_DEBUG : should be set to false after debugging is completed
2. APP_URL : Website URL
3. APP_LOGO_URL and APP_ICON_URL: Home page big picture and top menu icon
4. DB_*: database related configuration
5. STRIPE_KEY: the B2 in the previous article
6. STRIPE_SECRET: B3 in the previous section
![](./_image/2021-02-13/2021-02-14-10-49-57.png)
After creating the database docker2saas in MySQL, then run the command to initialize the database.
```bash
php artisan migrate
```
Start the development environment
```bash
php artisan serve --host=0.0.0.0 --port=8001
```
You can see the website by accessing port 8001 of the machine ip. Click register to register users and login automatically, the firs
没有合适的资源?快使用搜索试试~ 我知道了~
可让您在 10 分钟内 从 docker图像创建一个 SaaS 网站_PHP_代码_下载
共243个文件
php:176个
png:25个
gitignore:12个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 149 浏览量
2022-06-15
09:57:18
上传
评论
收藏 5.62MB ZIP 举报
温馨提示
Docker2SaaS 是一个通过虚拟化技术(调用云平台 api )实现多租户的工具,具有租户管理和订阅管理。它可以帮助 Web 应用程序和服务开发人员快速构建用于销售或订阅的网站。您需要做的就是制作应用程序的映像,然后设置和配置 Docker2SaaS 站点以开始将您的应用程序作为服务销售。 当用户订阅成功后,会按照配置自动从镜像创建一个VPS;当用户取消订阅并过期时,它会自动删除 VPS。用户可以登录该站点并查看他们的订阅、主机 IP 信息和其他详细信息。可以添加额外的扩展。
资源推荐
资源详情
资源评论
收起资源包目录
可让您在 10 分钟内 从 docker图像创建一个 SaaS 网站_PHP_代码_下载 (243个子文件)
artisan 2KB
web.config 1KB
app.css 3.88MB
app.css 95B
.editorconfig 220B
.env.example 978B
.gitattributes 111B
.gitignore 191B
.gitignore 119B
.gitignore 26B
.gitignore 23B
.gitignore 21B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.gitignore 14B
.htaccess 603B
favicon.ico 0B
app.js 671KB
bootstrap.js 869B
webpack.mix.js 696B
tailwind.config.js 570B
app.js 46B
package-lock.json 506KB
composer.json 2KB
package.json 693B
mix-manifest.json 71B
LICENSE 378B
composer.lock 361KB
README.md 14KB
README.zh-cn.md 13KB
terms.md 88B
policy.md 84B
navigation-menu.blade.php 13KB
welcome.blade.php 11KB
app.php 9KB
validation.php 8KB
api-token-manager.blade.php 7KB
session.php 7KB
plans.blade.php 6KB
welcome.blade.php 6KB
database.php 5KB
fortify.php 5KB
logout-other-browser-sessions-form.blade.php 5KB
droplets.blade.php 5KB
auth.php 4KB
pricing.blade.php 4KB
item.blade.php 4KB
two-factor-authentication-form.blade.php 4KB
WebhookController.php 3KB
update-profile-information-form.blade.php 3KB
application-logo.blade.php 3KB
mail.php 3KB
cache.php 3KB
modal.blade.php 3KB
logging.php 3KB
modify.blade.php 3KB
create.blade.php 3KB
register.blade.php 3KB
queue.php 3KB
members.blade.php 3KB
two-factor-challenge.blade.php 3KB
Item.php 3KB
Settings.php 2KB
Kernel.php 2KB
settings.blade.php 2KB
helpers.php 2KB
delete-user-form.blade.php 2KB
EmailVerificationTest.php 2KB
web.php 2KB
banner.blade.php 2KB
filesystems.php 2KB
Subscribe.php 2KB
jetstream.php 2KB
PasswordResetTest.php 2KB
UpdatePasswordTest.php 2KB
TwoFactorAuthenticationSettingsTest.php 2KB
login.blade.php 2KB
index.php 2KB
UpdateUserProfileInformation.php 2KB
broadcasting.php 2KB
update-password-form.blade.php 2KB
RouteServiceProvider.php 2KB
confirms-password.blade.php 2KB
sanctum.php 2KB
PlansController.php 2KB
app.php 2KB
hashing.php 2KB
Mine.php 1KB
dropdown.blade.php 1KB
reset-password.blade.php 1KB
Droplets.php 1KB
show.blade.php 1KB
ApiTokenPermissionsTest.php 1KB
mine.blade.php 1KB
verify-email.blade.php 1KB
app.blade.php 1KB
共 243 条
- 1
- 2
- 3
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于opencv的dnn模块实现Yolo-Fastest的目标检测python源码+模型+说明(高分项目).zip
- 使用Python调用微信本地ocr服务.zip
- 【精品推荐】人工智能在医疗中的应用.pptx
- 【精品推荐】电子医疗仪器人机接口-(1).ppt
- 【精品推荐】电子医疗仪器人机接口.ppt
- ubuntu镜像ubuntu镜像01
- 基于paddle搭建神经网络实现5种水果识别分类python源码+数据集(高分毕设).zip
- 【精品推荐】电子商务网店类型介绍.ppt
- 基于paddle搭建神经网络实现水果识别分类python源码+数据集(高分项目).zip
- 三菱plc编程口通信学习笔记.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功