From 33e8dbd5b309523f2423c04c8bf7d40b9e0315c8 Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Wed, 3 Jul 2019 11:02:38 +0200 Subject: [PATCH 1/2] :memo: Update docker related info Signed-off-by: mathieu.brunot --- README.md | 90 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 22d94170e..6c5eb14a7 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,6 @@ [![License: MPL-2.0][uri_license_image]][uri_license] [![Build Status](https://travis-ci.org/Monogramm/uxbox.svg)](https://travis-ci.org/Monogramm/uxbox) -[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/monogramm/uxbox.svg)](https://hub.docker.com/r/monogramm/uxbox/) -[![Docker Pulls](https://img.shields.io/docker/pulls/monogramm/uxbox.svg)](https://hub.docker.com/r/monogramm/uxbox/) -[![Docker layers](https://images.microbadger.com/badges/image/monogramm/uxbox.svg)](https://microbadger.com/images/monogramm/uxbox) # UXBOX # @@ -22,15 +19,28 @@ The open-source solution for design and prototyping. UXBOX is currently at an ea UXBOX works with SVG, a standard format, for all your designs and prototypes . This means that all your stuff in UXBOX is portable and editable in many other vector tools and easy to use on the web. +## Development ## + +Most of the main operations can be done through the helper script `manage.sh`. + +The development requires of UXBOX is done through a single docker container. Each main service is opened in a different [tmux](https://github.com/tmux/tmux) sessions. + ## Docker +Docker is also used to build release images for backend and frontend. Use the helper script `manage.sh` to build the images. +You can run locally UXBOX through a docker-compose or by manually running the containers. + +Complementary to the docker images you can build locally from this repository, you can find additionnal flavors for backend and frontend on external repositories: +* [Monogramm/docker-uxbox-frontend](https://github.com/Monogramm/docker-uxbox-frontend) +* [Monogramm/docker-uxbox-backend](https://github.com/Monogramm/docker-uxbox-backend) + + ### Persistent data The UXBOX installation and all data are stored in the database (file uploads, etc). The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`. That means your data is saved even if the container crashes, is stopped or deleted. To make your data persistent to upgrading and get access for backups is using named docker volume or mount a host folder. To achieve this you need one volume for your database container. Database: -- `/var/lib/mysql` MySQL / MariaDB Data - `/var/lib/postgresql/data` PostgreSQL Data ```console $ docker run -d \ @@ -38,6 +48,14 @@ $ docker run -d \ postgresql ``` +You also need to persist the UXBOX backend public resources (media and assets) to not lose images uploaded and allow the frontend to expose assets. +- `/srv/uxbox/resources/public` UXBOX backend public resources +```console +$ docker run -d \ + -v db:/srv/uxbox/resources/public \ + monogramm/docker-uxbox-backend +``` + ### Auto configuration via environment variables The following environment variables are also honored for configuring your UXBOX instance: @@ -45,39 +63,43 @@ The following environment variables are also honored for configuring your UXBOX #### Frontend **Only available at build time!** -- `-e UXBOX_CONFIG_URL=...` (defaults to http://127.0.0.1:6060/api) -- `-e UXBOX_DEMO=...` (defaults to false) -- `-e UXBOX_DEBUG=...` (defaults to false) +- `-e UXBOX_API_URL=...` (defaults to `/api`) +- `-e UXBOX_VIEW_URL=...` (defaults to `/view/`) +- `-e UXBOX_DEMO=...` (not defined, setting any value will activate demo mode) +- `-e UXBOX_DEBUG=...` (not defined, setting any value will activate debug mode) Available at runtime: -- `-e LANG=...` (defaults to en_US.UTF-8) -- `-e LC_ALL=...` (defaults to C.UTF-8) +- `-e LANG=...` (defaults to `en_US.UTF-8`) +- `-e LC_ALL=...` (defaults to `C.UTF-8`) #### Backend Available at runtime: -- `-e LANG=...` (defaults to en_US.UTF-8) -- `-e LC_ALL=...` (defaults to C.UTF-8) -- `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to false) -- `-e UXBOX_MEDIA_URI=...` (defaults to http://localhost:6060/media/) -- `-e UXBOX_MEDIA_DIRECTORY=...` (defaults to resources/public/media) -- `-e UXBOX_ASSETS_URI=...` (defaults to http://localhost:6060/static/) -- `-e UXBOX_ASSETS_DIRECTORY=...` (defaults to resources/public/static) -- `-e UXBOX_DATABASE_USERNAME="..."` (defaults to uxbox) -- `-e UXBOX_DATABASE_PASSWORD="..."` (defaults to youshouldoverwritethiswithsomethingelse) -- `-e UXBOX_DATABASE_NAME="..."` (defaults to uxbox) -- `-e UXBOX_DATABASE_SERVER="..."` (defaults to localhost) -- `-e UXBOX_DATABASE_PORT=...` (defaults to 5432) -- `-e UXBOX_EMAIL_REPLY_TO="..."` (defaults to no-reply@uxbox.io) -- `-e UXBOX_EMAIL_FROM="..."` (defaults to no-reply@uxbox.io) -- `-e UXBOX_SMTP_HOST="..."` (defaults to localhost) -- `-e UXBOX_SMTP_PORT=...` (defaults to 25) -- `-e UXBOX_SMTP_USER="..."` (defaults to uxbox) -- `-e UXBOX_SMTP_PASSWORD="..."` (defaults to youshouldoverwritethiswithsomethingelse) -- `-e UXBOX_SMTP_SSL=...` (defaults to false) -- `-e UXBOX_SMTP_TLS=...` (defaults to false) -- `-e UXBOX_SMTP_ENABLED=...` (defaults to false) -- `-e UXBOX_SECRET="..."` (defaults to youshouldoverwritethiswithsomethingelse) +- `-e LANG=...` (defaults to `en_US.UTF-8`) +- `-e LC_ALL=...` (defaults to `C.UTF-8`) +- `-e UXBOX_HTTP_SERVER_PORT=...` (defaults to `6060`) +- `-e UXBOX_HTTP_SERVER_DEBUG=...` (defaults to `true`) +- `-e UXBOX_DATABASE_USERNAME="..."` (defaults to `nil`) +- `-e UXBOX_DATABASE_PASSWORD="..."` (defaults to `nil`) +- `-e UXBOX_DATABASE_NAME="..."` (defaults to `"uxbox"`) +- `-e UXBOX_DATABASE_SERVER="..."` (defaults to `"localhost"`) +- `-e UXBOX_DATABASE_PORT=...` (defaults to `5432`) +- `-e UXBOX_MEDIA_DIRECTORY=...` (defaults to `resources/public/media`) +- `-e UXBOX_MEDIA_URI=...` (defaults to `http://localhost:6060/media/`) +- `-e UXBOX_ASSETS_DIRECTORY=...` (defaults to `resources/public/static`) +- `-e UXBOX_ASSETS_URI=...` (defaults to `http://localhost:6060/static/`) +- `-e UXBOX_EMAIL_REPLY_TO="..."` (defaults to `no-reply@uxbox.io`) +- `-e UXBOX_EMAIL_FROM="..."` (defaults to `no-reply@uxbox.io`) +- `-e UXBOX_SUPPORT_EMAIL="..."` (defaults to `support@uxbox.io`) +- `-e UXBOX_SMTP_HOST="..."` (defaults to `"localhost"`) +- `-e UXBOX_SMTP_PORT=...` (defaults to `25`) +- `-e UXBOX_SMTP_USER="..."` (defaults to `nil`) +- `-e UXBOX_SMTP_PASSWORD="..."` (defaults to `nil`) +- `-e UXBOX_SMTP_SSL=...` (defaults to `false`) +- `-e UXBOX_SMTP_TLS=...` (defaults to `false`) +- `-e UXBOX_SMTP_ENABLED=...` (defaults to `false`) +- `-e UXBOX_REGISTRATION_ENABLED=...` (defaults to `true`) +- `-e UXBOX_SECRET="..."` (defaults to `"5qjiAndGY3"`) **Important note:** make sure to use quotation marks for string variables or the backend might try to interpret the values as symbols and have weird issues. @@ -89,12 +111,6 @@ We love the open source software community. Contributing is our passion and beca Please refer to the [Contributing Guide](./CONTRIBUTING.md) -## Development ## - -Most of the main operations can be done through the helper script `manage.sh`. - -The development requires of UXBOX is done through a single docker container. Each main service is opened in a different [tmux](https://github.com/tmux/tmux) sessions. - ## License ## ``` From 8c21aac16e650eace4632928f2b33aff662049df Mon Sep 17 00:00:00 2001 From: "mathieu.brunot" Date: Sat, 13 Jul 2019 17:11:20 +0200 Subject: [PATCH 2/2] :wrench: Set backend script permissions Signed-off-by: mathieu.brunot --- backend/scripts/prepare-release.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 backend/scripts/prepare-release.sh diff --git a/backend/scripts/prepare-release.sh b/backend/scripts/prepare-release.sh old mode 100644 new mode 100755