Git Product home page Git Product logo

Comments (9)

jhpyle avatar jhpyle commented on July 23, 2024

That's a very good idea. I'll add that.

The in-browser editor (based on codemirror) is pretty good, as in-browser editors go. But like you I still prefer to use a real text editor.

I find uploading to be an inconvenient step in a workflow. Is there something that would be even more convenient for you than uploading? Google Drive integration, maybe?

This is not terribly elegant, but if you are using S3 for data storage, you could use s3fs to mount your S3 bucket as a network drive on your local computer, then edit the YML files in playground/1 (or whatever your user id is). Then, in your browser you can create a bookmark for the link that you obtain from the "Share" button on the playground (e.g., https://demo.docassemble.org/?i=docassemble.playground1:EmailAdviceLetter.yml), and run the code by going to the bookmark.

from docassemble.

jrmiller82 avatar jrmiller82 commented on July 23, 2024

I'm using persistent volume for storage... I'm already paying for the VPS and it has way more storage space than I anticipate my law office interviews will take up. So no need to pay for S3.

The google drive / dropbox etc.. just seems like another point of failure for security in exchange for a little convenience.

You're right, it's not terribly elegant; but, I just can't edit code without my vim keybindings. :)

from docassemble.

jhpyle avatar jhpyle commented on July 23, 2024

I added an upload button to the Playground. It uses the filename of the uploaded file, and will overwrite a file in the Playground with the same name.

CodeMirror has a Vim keybindings option, so I created a global configuration option that enables it. It's not a true vi editor, of course, but it does support the basic stuff. (As an emacs fan, I really should create an option for the emacs key bindings. I can get to that later, I guess.)

from docassemble.

jhpyle avatar jhpyle commented on July 23, 2024

For what it's worth, I have found that Amazon S3 costs are de minimis -- a few cents per month. I prefer S3 to using persistent volumes because that way I can tear down the whole virtual machine, start up a new one (with latest kernel, latest version of Docker, latest version of docassemble, etc.) and everything in docassemble picks up where it left off. I feel safer with an automatic backup that is outside of the virtual machine. Also, the persistent volume method limits you to one application server, so S3 is more scalable.

from docassemble.

jrmiller82 avatar jrmiller82 commented on July 23, 2024

Thanks. I'll update my docker image sometime this weekend and try it out. Thanks for the vim keybindings option. That may be enough to help me out :)

I do use S3 for many things. And I do see the benefit if you needed to scale or were wiping virtual machines often. However, I'm a solo so I don't anticipate large data storage. And, I rarely wipe my servers, and I have my own backup solution (to S3). No offense, but until I can read every line of docassemble, it's not getting any of my S3 keys. (yes, I know how to limit a key to a specific bucket with policies; but, I'm lazy :) ) I also thought I saw somewhere that docassemble is not encrypting data stored in the S3 bucket, so that's another third-party I have to trust (S3) if I'm not encrypting the data first on my own server.

I also technically use emacs but with evil-mode via Spacemacs. Small world :) You don't happen to ever hang out in #emacs on freenode?

from docassemble.

jhpyle avatar jhpyle commented on July 23, 2024

On AWS you can not only limit the buckets that keys can access but you can avoid sharing keys entirely by giving your instance an IAM role that has permissions to access a particular bucket without sending a key. (I love AWS. Most of the time.)

Regarding server-side encryption, the answers that users provide to questions are encrypted in SQL, and the backing up of the SQL dump to S3 does not undo that encryption. However, file uploads, assembled PDF files, and the docassemble configuration file are not encrypted, and they would all be stored on S3, which could be a security concern. I should probably look for a good file encryption library...

If I entered #emacs on freenode my level of distraction might reach a tipping point. Perhaps I should be scared.

I hadn't heard of Spacemacs. I will need to check that out. Screenshots look very cool.

from docassemble.

jrmiller82 avatar jrmiller82 commented on July 23, 2024

I don't like using EC2 instances because they are much more expensive than the equivalent linode or digitalocean VPS. (I don't need large scalability... I'm using low end servers). Sure, I know about making IAM role with access to a single bucket (that's what I was referring to above); I just don't see the need for my solo practice. If I was writing software for a state-wide pro bono provider, I see why scalability is important!

If my site needs scalability beyond giving it 2gb of ram and 2 CPUs to run docassemble, I'll be happier than anything since it means I'm making money hand over fist. 🗡

That's nice about the encrypted SQL; but, I have login credentials to a noreply email address smtp server in my configuration file for my practice. I wouldn't want that in the plain on S3 (not that I believe Amazon will proactively snoop as an institution; but, one rogue Amazon employee might snoop).

Spacemacs is awesome if you are tired of messing with your .emacs (I was). It has a bunch of sensible defaults and easily turned on and off "layers" for tasks such as org-mode, git, python, golang, etc...

from docassemble.

cediorio avatar cediorio commented on July 23, 2024

Wondering if you could point me in the direction of where the data files are stored on the server? I'm running a local docker version for development, and would love to just zip and cp, rather than upload via the interface. Or is the real time-lag here the pip install process? Are there any faster alternatives when you're working up your interview logic incrementally?

from docassemble.

jhpyle avatar jhpyle commented on July 23, 2024

Installed Python packages are installed by pip under /usr/share/docassemble/local/lib/python2.7/site-packages/. If you are using the Playground, the files are under /usr/share/docassemble/files/playground/1 if you are the admin user.

Another workflow is to push to GitHub and then install the package on the docassemble server with the GitHub link. Pressing the Update button in the Update Package screen for your package will install from the latest version on GitHub.

I always develop interviews in the Playground and then export them as packages only when I am ready to put them into production. The CodeMirror-based editor in the Playground is not as good as a real text editor, but it is very convenient because you can run the Playground in one browser tab and a test interview session in another browser tab. You can press the Save button in the Playground after making a change to the interview code, then go to the other tab and re-load the screen to see the effect of your changes.

from docassemble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.