Skip to content

henleo/ask-your-repository-docker

 
 

Repository files navigation

ask-your-repository-docker

A docker-compose deployment for ask-your-repository.

Setup on Server

Make sure docker and docker-compose are installed.


Clone this repository on your server:

git clone https://github.com/hpi-sam/ask-your-repository-docker.git

Change directory:

cd ask-your-repository-docker

Setup .env files:

cp .env.example .env
cp nginx.env.example nginx.env

touch elija.env (see here for env example)
touch tobito.env (see here for env example)

Fill the environment files with appropriate data.


Initialize docker swarm:

docker swarm init

Explicitly export your envars:

export $(cat .env | xargs)

Deploy application:

docker stack deploy -c docker-compose.yaml <name>

Make sure all services are up and running:

docker service ls

Changes to the configuration

Always commit your changes to this repo to keep it in sync with the files on the server!

Do not make adjustments to the docker-compose.yaml directly.
Instead, use the env files to change configurations.

If you do need to change the compose file try to keep things customizable.
Make sure the compose file still works for different environments (development, staging, production).

After making adjustments redeploy the stack:

docker stack deploy -c docker-compose.yaml <name>

Redeploy services

You can deploy another version of a service by using the deploy script:

./deploy <service> <image>

For example to deploy the latest Jona image:

./deploy jona bp2018hg1/jona:latest

Mind that you don't need to specify the real service name with the stack name as a prefix. The stack name is added automatically.

For more informations view the deploy script file.

About

Docker Deployment of Ask-Your-Repository

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%