Der Mediaserver in 3. Generation
10K+
The new and shiny webfactory mediaserver.
Make sure you have Java and Maven installed:
brew install maven
Also, install the Heroku Toolbelt.
$ git clone [email protected]:webfactory/gutenberg-reloaded.git
$ cd gutenberg-reloaded
$ mvn clean install
$ heroku local:start
Your app should now be running on localhost:5000.
Shortcut for starting the webserver without execution of tests:
mvn clean install -Dmaven.test.skip=true && heroku local
The mediaserver is configured via environment variables.
To define the configuration locally, create a .env file in the project root and set environment variables and their value:
LOG_LEVEL=info
AUTHENTICATION_USERNAME=webfactory
AUTHENTICATION_PASSWORD=test
The master branch is automatically deployed on push:
$ git push
AWS Elastic Beanstalk can be used to deploy the application.
To interact with Elastic Beanstalk, you have to install the eb CLI tool.
After your first installation, you need to initialize your eb CLI with
eb init
To always configure ssh access on deployment:
eb init -k <name of ssh key in ~/.ssh>
You will be asked for AWS credentials - switch to the AWS website, open IAM, search for your user and create a new access key that you can provide to the eb CLI.
AWS Elastic Beanstalk uses Green/Blue Deployment, which means that you shouldn't deploy to the environment that is using your production URL.
This is how you would normally want to deploy a new version :
# YYYYMMDD-xx = date-version e.g. 20180921-01
eb create --env-group-suffix YYYYMMDD-xx
eb swap gutenberg-YYYYMMDD-xx
Once you confirmed that the new environment works without errors you should terminate the old environment so that we don't pay more than we have to
eb terminate <old environment that used to have gutenberg-production url>
An AWS Elastic Beanstalk environment is an installation of the application that is reachable via a custom domain.
An environment is created once (for example for production, test, a specific customer etc.). Application versions can be deployed separately to environments.
Use the following command to create the environment gutenberg-dev:
eb create --env-group-suffix dev
Use the following command to deploy the active commit:
eb deploy
A mapping from branches to environment is maintained in .elasticbeanstalk/config.global.yml.
Deploying to a specific environment ist possible via:
eb deploy [environment name]
Run the unit tests with the following command:
mvn test
Test cases are created in src/test/java.
Execute a single test case...
mvn '-Dtest=ConcatPdfTest' test
... or test cases from a specific namespace:
mvn '-Dtest=de.webfactory.mediaserver.operation.*' test
Use the LOG_LEVEL environment variable to increase or reduce the log messages during test runs:
LOG_LEVEL=debug mvn test
Content type
Image
Digest
sha256:0b2d0be63…
Size
239 MB
Last updated
almost 3 years ago
docker pull webfactory/gutenberg-reloaded