user dockerhub for image building and travis-ci for testing

This commit is contained in:
Christoph Haas 2020-11-10 12:24:18 +01:00
parent bd3da3d6c7
commit 516561445b
3 changed files with 9 additions and 74 deletions

View File

@ -1,31 +1,4 @@
# make use of vm's language: go
sudo: 'required'
# have the docker service set up (we'll go:
# update it later) - 1.15.x
services:
- docker
# prepare the machine before any code
# installation scripts
before_install:
- ./.travis/main.sh
script:
- make docker-build
# only execute the following instructions in
# the case of a success (failing at this point
# won't mark the build as a failure).
# To have `DOCKER_USERNAME` and `DOCKER_PASSWORD`
# filled you need to either use `travis`' cli
# and then `travis set ..` or go to the travis
# page of your repository and then change the
# environment in the settings panel.
after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD ;
make docker-push ;
fi

View File

@ -1,43 +0,0 @@
#!/bin/bash
set -o errexit
main() {
setup_dependencies
update_docker_configuration
echo "SUCCESS:
Done! Finished setting up travis machine.
"
}
setup_dependencies() {
echo "INFO:
Setting up dependencies.
"
sudo apt update -y
sudo apt install realpath python python-pip -y
sudo apt install --only-upgrade docker-ce -y
sudo pip install docker-compose || true
docker info
docker-compose --version
}
update_docker_configuration() {
echo "INFO:
Updating docker configuration
"
echo '{
"experimental": true,
"storage-driver": "overlay2",
"max-concurrent-downloads": 50,
"max-concurrent-uploads": 50
}' | sudo tee /etc/docker/daemon.json
sudo service docker restart
}
main

View File

@ -10,3 +10,8 @@ services:
volumes: volumes:
- /etc/wireguard:/etc/wireguard - /etc/wireguard:/etc/wireguard
- ./data:/app/data - ./data:/app/data
ports:
- '8123:8123'
environment:
- EXTERNAL_URL=http://localhost:8123
- ADMIN_PASS=a