mirror of
https://github.com/DJSundog/wg-portal.git
synced 2024-11-23 07:03:50 -05:00
user dockerhub for image building and travis-ci for testing
This commit is contained in:
parent
bd3da3d6c7
commit
516561445b
33
.travis.yml
33
.travis.yml
@ -1,31 +1,4 @@
|
||||
# make use of vm's
|
||||
sudo: 'required'
|
||||
language: go
|
||||
|
||||
# have the docker service set up (we'll
|
||||
# update it later)
|
||||
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
|
||||
go:
|
||||
- 1.15.x
|
@ -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
|
@ -9,4 +9,9 @@ services:
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- /etc/wireguard:/etc/wireguard
|
||||
- ./data:/app/data
|
||||
- ./data:/app/data
|
||||
ports:
|
||||
- '8123:8123'
|
||||
environment:
|
||||
- EXTERNAL_URL=http://localhost:8123
|
||||
- ADMIN_PASS=a
|
Loading…
Reference in New Issue
Block a user