美文网首页
Appsmith快速入门

Appsmith快速入门

作者: Nick_4438 | 来源:发表于2022-12-11 23:07 被阅读0次

简介

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

相关文章

网友评论

      本文标题:Appsmith快速入门

      本文链接:https://www.haomeiwen.com/subject/rtjqqdtx.html