Sign inSign up

anvilworks/anvil-app-server

By anvilworks

Updated 3 months ago

Image
6

10K+

anvilworks/anvil-app-server repository overview

Anvil App Server

This is the open-source Anvil App Server, packaged up ready for you to use directly.

Basic Usage

First, clone an Anvil app that you have built on Anvil or locally:

$ git clone ssh://<MY-APP> MyApp

Then run the container:

$ docker run -v $PWD/MyApp:/apps/MainApp -p 3030:3030 anvilworks/anvil-app-server

Advanced Usage

Custom app names and dependencies

By default, the Anvil App Server will serve the app it finds in /apps/MainApp, so this is where you should mount your app as a volume. Alternatively, you can choose which app to run:

$ docker run -v $PWD/MyApp:/apps/CustomAppName -p 3030:3030 anvilworks/anvil-app-server --app CustomAppName

You should also make sure that any dependencies for your app are available inside /apps in the container.

Persistent data

The Anvil App Server creates a PostgreSQL Database and other data in /anvil-data inside the container. To have this data persist outside the container, mount this directory as a volume, then run the container as a (non-root) user with write access to that directory:

$ mkdir anvil-data
$ docker run -v $PWD/MyApp:/apps/MainApp -v $PWD/anvil-data:/anvil-data -u $UID -p 3030:3030 anvilworks/anvil-app-server

Other configuration

You can pass all the usual configuration options to the container directly as command line arguments, environment variables, or in a configuration file. See the Anvil App Server README for full details.

Tag summary

Content type

Image

Digest

sha256:d33d002b7

Size

902.6 MB

Last updated

almost 2 years ago

docker pull anvilworks/anvil-app-server