This repository has been archived by the owner on Jun 12, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from MarvinMenzerath/develop
v2.2.1
- Loading branch information
Showing
58 changed files
with
3,953 additions
and
1,342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,7 @@ | |
|
||
# IDE (IntelliJ IDEA) | ||
.idea/ | ||
UpAndRunning2.iml | ||
|
||
# Application | ||
config/local*.json | ||
docs/ | ||
README.md | ||
docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ _testmain.go | |
|
||
# IDE (IntelliJ IDEA) | ||
.idea/ | ||
UpAndRunning2.iml | ||
|
||
# Application | ||
config/local*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
FROM alpine:3.4 | ||
FROM alpine:3.5 | ||
MAINTAINER Marvin Menzerath <github@marvin-menzerath.de> | ||
|
||
ENV UAR2_IS_DOCKER true | ||
|
||
WORKDIR /app/upandrunning2/ | ||
COPY . /app/upandrunning2/ | ||
RUN chmod +x ./docker/build.sh && sync && ./docker/build.sh | ||
|
||
USER uar2 | ||
EXPOSE 8080 | ||
ENTRYPOINT ["./UpAndRunning2"] | ||
VOLUME /app/upandrunning2/config/ | ||
ENTRYPOINT ["./UpAndRunning2"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,33 @@ | ||
# Docker Guide | ||
[![Docker Version](https://images.microbadger.com/badges/version/marvinmenzerath/upandrunning2.svg)](http://microbadger.com/images/marvinmenzerath/upandrunning2) | ||
[![Docker Layers](https://images.microbadger.com/badges/image/marvinmenzerath/upandrunning2.svg)](http://microbadger.com/images/marvinmenzerath/upandrunning2) | ||
|
||
You can use the small and always up-to-date Docker-image from [Docker Hub](https://hub.docker.com/r/marvinmenzerath/upandrunning2/) to deploy UpAndRunning2 quickly and easily. | ||
Internally this image uses a custom user and group (both called `uar2` with an id of `1777`). | ||
|
||
## Installation | ||
|
||
### Database | ||
Use these commands to create a new volume called `uar2-db-data` and start a new MariaDB-container called `uar2-db`, which stores it's data inside the previously created volume and uses the root-password `topSecretPassword`: | ||
``` | ||
docker volume create --name uar2-db-data | ||
docker run -d --name uar2-db -v uar2-db-data:/var/lib/mysql/ -e MYSQL_ROOT_PASSWORD='topSecretPassword' mariadb | ||
``` | ||
|
||
If you do not want to use a volume to store the databases's data, simply use this command: | ||
``` | ||
docker run -d --name uar2-db -e MYSQL_ROOT_PASSWORD='topSecretPassword' mariadb | ||
``` | ||
Setup a MySQL-compatible database (for example by using the [MariaDB image](https://hub.docker.com/_/mariadb/)) and make a note of the database credentials. | ||
|
||
### UpAndRunning2 | ||
Use this command to create and start a new UpAndRunning2-container called `uar2`, which is linked to the previously created `uar2-db`-container and exposes the web-interface and API on the host's port `80`. | ||
Use this command to create and start a new UpAndRunning2-container called `uar2`, which exposes the web-interface and API on the host's port `80`. | ||
Additionally it stores the configuration-files inside the host's `/srv/uar2/config/` directory, which allows you to change certain parameters. | ||
``` | ||
docker run -d --name uar2 --link uar2-db:mysql -p 80:8080 marvinmenzerath/upandrunning2 | ||
docker run -d --name uar2 -v /srv/uar2/config/:/app/upandrunning2/config/ -p 80:8080 marvinmenzerath/upandrunning2 | ||
``` | ||
|
||
To make use of the mounted config-directory, you need to: | ||
* pull a recent copy of the [`default.json`-file](../../config/default.json) | ||
* create a copy of it called `local.json` | ||
* and make your custom changes in this file | ||
|
||
After those changes you need to restart your container using `docker restart uar2`. | ||
|
||
## Upgrading | ||
Just remove the old container, pull the new image and deploy a new container. Make sure to add previously set environment-variables. | ||
Just remove the old container, pull the new image and deploy a new container. | ||
``` | ||
docker stop uar2 | ||
docker rm uar2 | ||
docker pull marvinmenzerath/upandrunning2 | ||
docker run -d --name uar2 --link uar2-db:mysql -p 80:8080 marvinmenzerath/upandrunning2 | ||
``` | ||
|
||
## Configuration | ||
There are a few things you can configure using environment-variables. | ||
To do so, just add those environment-variables when creating the container like this: | ||
``` | ||
docker run -d --name uar2 --link uar2-db:mysql -p 80:8080 -e UAR2_VARIABLE_NAME='CONTENT' marvinmenzerath/upandrunning2 | ||
``` | ||
|
||
### Configurable Settings | ||
* `UAR2_APPLICATION_TITLE` (e.g. `UpAndRunning2`) | ||
* `UAR2_REDIRECTSTOFOLLOW` (e.g. `3`) | ||
* `UAR2_CHECKIFOFFLINE` (e.g. `true`) | ||
* `UAR2_CHECKLIFETIME` (e.g. `31`) | ||
* `UAR2_USEWEBFRONTEND` (e.g. `true`) | ||
* `UAR2_TELEGRAMBOTAPIKEY` (e.g. `123456`) | ||
|
||
### Mailer | ||
If you want to use the built-in mailer, you will need to set those environment-variables: | ||
* `UAR2_MAILER_HOST` (e.g. `smtp.mymail.com`) | ||
* `UAR2_MAILER_PORT` (e.g. `587`) | ||
* `UAR2_MAILER_USER` (e.g. `myUser@mymail.com`) | ||
* `UAR2_MAILER_PASSWORD` (e.g. `mySecretPassword`) | ||
* `UAR2_MAILER_FROM` (e.g. `upandrunning2@mymail.com`) | ||
|
||
#### Example | ||
``` | ||
docker run -d --name uar2 --link uar2-db:mysql -p 80:8080 -e UAR2_MAILER_HOST='smtp.mymail.com' -e UAR2_MAILER_PORT='587' -e UAR2_MAILER_USER='myUser@mymail.com' -e UAR2_MAILER_PASSWORD='mySecretPassword' -e UAR2_MAILER_FROM='upandrunning2@mymail.com' marvinmenzerath/upandrunning2 | ||
``` | ||
docker run -d --name uar2 -v /srv/uar2/config/:/app/upandrunning2/config/ -p 80:8080 marvinmenzerath/upandrunning2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.