Designed as a plugin for the [Yellow Bike Database](https://github.com/fspc/Yellow-Bike-Database), which is a specialized software for Community Bike Shops, [etherpad-and-draw-node-alpine](https://github.com/fspc/etherpad-and-draw-node-alpine) can be used for any project that wants to run lightweight alpine linux based dockerized containers with etherpad with etherdraw functionality built-in with an easy to setup docker-compose file.
The etherpad Dockerfile and entrypoint.sh is a fork of the work by [tvelocity](https://github.com/tvelocity/dockerfiles/tree/master/etherpad-lite) altered to work with alpine linux and rehashed to work with etherdraw. Tvelocity's own work was inspired by the official Wordpress Dockerfile and johbo's etherpad-lite image. That's how Free Software works!
## How to Use
The recommended way is to run `docker-compose up -d`. Out of the box, there is only one requirement: There must be a running container created from one of the official mysql images like [MariaDB](https://hub.docker.com/_/mariadb/). The default name for the container is `mysql`, but you can change the name in .env to whatever you have named your own mysql container:
`SQL_CONTAINER=my_own_mysql_container_name`
This will bring up two containers on port 9001 (etherpad) and port 9002 (etherdraw). If your are running on localhost, etherdraw should work properly within etherpad. If you are on a network, simply add this line to .env:
There are several other environmental variables you can change where VARIABLE=default value:
```
PAD_DATABASE=pad
PAD_PASSWORD=password
DB_HOST=mysql (must be the same value as SQL_CONTAINER)
PAD_TITLE=Online Flip Chart
ADMIN_PASSWORD=admin_password
ADMIN_USER=admin
DRAW_DATABASE=draw
DRAW_PASSWORD=password
DRAW_TITLE=Ether Draw
DRAW_PORT=9002
```
## Advanced environmental changes
Two empty files, `pad_environment` and `draw_environment` are included to add your own environmental variables and values. For instance, I enjoy using [docker-letsencrypt-nginx-proxy-companion](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion), so here is what I add:
To change, simply edit [etherpad/Dockerfile](https://github.com/fspc/etherpad-and-draw-node-alpine/blob/master/etherpad/Dockerfile) after `RUN npm install`.
If any of the plugins require configuration, simply edit [etherpad/entrypoint.sh](https://github.com/fspc/etherpad-and-draw-node-alpine/blob/master/etherpad/entrypoint.sh) between `cat <<- EOF > settings.json` and `EOF`.