Appsmith快速入门

简介

Appsmith是一个帮助开发者快速建立企业内部应用的低代码平台,为开发者节约数据调用与页面设计的时间,本文参考官方文档,帮助快速搭建一个低代码平台。本文使用docker本地安装一个体验测试环境。

安装前需要已经安装好docker,需要版本如下:

  • Docker ( 20.10.7或者更高)
  • Docker-Compose ( 1.29.2或者更高)

准备mysql

  • 启动mysql 容器
#!/bin/bash
docker run --name mysql -e MYSQL_ROOT_PASSWORD=123456 \
                        -e MYSQL_DATABASE=demo \
                        -e TZ=Asia/Shanghai \
                        -p 33261:3306 -d mysql:8.0.31 --lower-case-table-names=1


  • 准备数据
docker  exec -it  mysql sh 
mysql -uroot -p123456
# use mysql;
# ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
# FLUSH PRIVILEGES;

CREATE DATABASE IF NOT EXISTS `demo`;
use demo;

drop table if exists `student`;
create table `student`(
    id int(11) primary key auto_increment,
    name varchar(20) ,
    tall int(11)
);

insert into student(name,tall) values ('nick',170),
                                    ('tim',165);

select name,tall from student;

清理mysql
docker stop mysql && docker rm mysql

启动appsmith

  • 准备docker-compose.yml文件
version: "3"

services:
  appsmith:
    image: index.docker.io/appsmith/appsmith-ce
    container_name: appsmith
    ports:
      - "80:80"
      - "443:443"
    environment:
      - APPSMITH_ALLOWED_FRAME_ANCESTORS="'self' http://trusted-other.com http://*.mycompany.com"
    volumes:
      - ./stacks:/appsmith-stacks
    restart: unless-stopped
    # Uncomment the lines below to enable auto-update
    #labels:
    #  com.centurylinklabs.watchtower.enable: "true"

  #auto_update:
  #  image: containrrr/watchtower
  #  volumes:
  #    - /var/run/docker.sock:/var/run/docker.sock
  #  # Update check interval in seconds.
  #  command: --schedule "0 0 * ? * *" --label-enable --cleanup
  #  restart: unless-stopped
  #  depends_on:
  #    - appsmith
  #  environment:
  #    - WATCHTOWER_LIFECYCLE_HOOKS=true
  • 启动appsmith
docker-compose up -d

清理关闭appsmith: docker-compose down

  • 访问http://localhost/配置
  • 访问appsmith,http://localhost,开始初始化appsmith
image.png
image.png
image.png
  • 启动之后有一个手把手的教材,读者可以跟着学习

清理

docker stop mysql 
docker rm  mysql 
docker stop appsmith
docker rm appsmith

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容