-
Notifications
You must be signed in to change notification settings - Fork 4
Docker
You can install and run Zeta fully automized via Docker Compose. This is the preferred way. First you have to install Docker with Docker Compose:
Note: If you are using Docker on Windows or Mac, you must allocate at least 3 to 4 GB of memory to the Docker machine.
- Install Docker (tested with Docker version 1.12.3)
- Manage Docker as a non-root user
- Install Docker Compose
After installation you have to checkout this repository on your local system.
List of Docker Compose services:
- images: Build generator images
- api: Webpage, Auth, REST API, ...
- mongodb: NoSQL database
- webapp: Web application for generators
To build the webapp container, you have to set the repository environment first. At first, you have to create a developer token with your GitHub account.
- Login on the GitHub page.
- Navigate to your accout settings.
- Under
Developer settings
create a personal access token. - Select the
repo
scope and push theGenerate new token
button at the bottom of the page. - Copy your token and keep it secret.
- To set the env variable, there are two ways to do this:
- Create in the root folder of the repository the
.env
file and insert the token likeTOKEN=<Your token>
. - Set the env variable for your shell session. On Unix systems use
export TOKEN=<Your token>
.
Now you can create the frontend container with docker-compose build
or specific for the frontend docker-compose build webapp
.
Note: temporarily not used!
Generation works without docker!
(First, all Docker images need to be build.)
docker-compose up images
To start all services simply run the below command.
docker-compose up -d api
On the first run this can take up to 30 min (thx to SBT). After this time Zeta is available via localhost.
If MongoDB is failing to start with an error connected to WiredTiger, check out this post: https://stackoverflow.com/questions/54911021/unable-to-start-docker-mongo-image-on-windows
The problem should be fixed after modifying the docker-compose file. Maybe you have to create a docker volume "mongodata" first.
Two steps are required to create a generator.
-
Create a Docker Image: First you need to create a Docker image for the execution of a generator. A few examples can be found in the images directory. An example how to build an image can be found in createDockerImages.sh, which is primarly used by the images service (docker-compose).
-
Make the Docker Image available: After an image was created we need to create a document in the database which links to the Docker image. The created document will make the previous created Docker image available for users.