10 Commits

Author SHA1 Message Date
2e84d93951 sync installer stuff
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-16 08:01:45 -08:00
d402abd69b make nginx log to stdout
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build was killed
2020-02-16 06:05:16 -08:00
a2b750a71e fix indentation in example
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-15 12:45:46 -08:00
3b4e6fdc38 revert .drone.yml
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-15 12:16:12 -08:00
587425b1ed kickoff CI 2020-02-15 12:14:58 -08:00
0d8f43c685 fix bug 2020-02-15 11:41:56 -08:00
1256279e1c update .drone.yml to push latest 2020-02-15 11:08:40 -08:00
9217e7367e update drone.yml 2020-02-15 11:02:56 -08:00
0b821850d2 push master as latest as well
All checks were successful
continuous-integration/drone/push Build is passing
2020-02-15 10:59:00 -08:00
a18f1b41fa update readme 2020-02-15 10:57:52 -08:00
5 changed files with 43 additions and 22 deletions

View File

@@ -12,7 +12,7 @@ steps:
password: password:
from_secret: docker_password from_secret: docker_password
tags: tags:
- ${DRONE_BRANCH//\//-}-${DRONE_COMMIT_SHA:0:8}
- ${DRONE_COMMIT_SHA} - ${DRONE_COMMIT_SHA}
- ${DRONE_BRANCH/\//-} - ${DRONE_BRANCH/\//-}
- latest

View File

@@ -41,21 +41,30 @@ The mirror stores all the data in a docker volume at path
``` ```
docker rm -f local-ubuntu-mirror docker rm -f local-ubuntu-mirror
docker run -d --name local-ubuntu-mirror \ docker run -d --name local-ubuntu-mirror \
-v /storage/mirrors/ubuntu:/var/mirror/ubuntu \ -v /storage/mirrors/ubuntu:/var/mirror/ubuntu \
--env MIRROR_UPDATE_INTERVAL_SECONDS=3600 \ --env MIRROR_UPDATE_INTERVAL_SECONDS=3600 \
--env UBUNTU_MIRROR_ARCHITECTURES=amd64 \ --env UBUNTU_MIRROR_ARCHITECTURES=amd64 \
--env UBUNTU_MIRROR_UPSTREAM=us.archive.ubuntu.com \ --env UBUNTU_MIRROR_UPSTREAM=us.archive.ubuntu.com \
--env UBUNTU_MIRROR_PROJECTS=focal,focal-updates,focal-security,focal-backports \ --env UBUNTU_MIRROR_PROJECTS=focal,focal-updates,focal-security,focal-backports \
-p 8080:80 \ -p 8080:80 \
--restart unless-stopped \ --restart unless-stopped \
sneak/ubuntumirror:latest sneak/ubuntumirror@sha256:7de7cc8245106bb574029a2dedca5aa218af08d802b989cdc7857fb57f876a02
``` ```
# Example CapRover Definition File # Example CapRover Definition File
``` ```
{ {
"schemaVersion": 2, "schemaVersion": 2,
"imageName": "sneak/ubuntumirror:latest" "imageName": "sneak/ubuntumirror@sha256:7de7cc8245106bb574029a2dedca5aa218af08d802b989cdc7857fb57f876a02"
} }
``` ```
# Author
sneak <[sneak@sneak.berlin](mailto:sneak@sneak.berlin)>
# License
This software is released into the public domain.

View File

@@ -9,5 +9,5 @@ rm -rf /var/mirror/ubuntu/.temp
while sleep 1 ; do while sleep 1 ; do
cd /opt/mirror && make cd /opt/mirror && make
sleep ${MIRROR_INTERVAL_SECONDS} sleep ${MIRROR_UPDATE_INTERVAL_SECONDS}
done done

View File

@@ -16,17 +16,26 @@ if [[ "$UBUNTU_ENABLE_SOURCE_MIRRORING" != "false" ]]; then
SOURCEOPT="--source" SOURCEOPT="--source"
fi fi
debmirror \ DONE=0
-a ${UBUNTU_MIRROR_ARCHITECTURES} \
-s ${UBUNTU_MIRROR_CATEGORIES} \
-h ${UBUNTU_MIRROR_UPSTREAM} \
-d ${UBUNTU_MIRROR_PROJECTS} \
$SOURCEOPT \
--ignore-small-errors \
-r /ubuntu \
--getcontents \
--progress \
--method=http \
$DST/ubuntu
chmod -R a+rX $DST while [[ $DONE -eq 0 ]]; do
debmirror \
-a ${UBUNTU_MIRROR_ARCHITECTURES} \
-s ${UBUNTU_MIRROR_CATEGORIES} \
-h ${UBUNTU_MIRROR_UPSTREAM} \
-d ${UBUNTU_MIRROR_PROJECTS} \
$SOURCEOPT \
--di-dist=dists \
--di-arch=arches \
--ignore-small-errors \
-r /ubuntu \
--getcontents \
--progress \
--method=http \
$DST/ubuntu
if [[ $? -eq 0 ]]; then
DONE=1
fi
chmod -R a+rX $DST
sleep 1
done

View File

@@ -3,11 +3,14 @@ worker_processes auto;
pid /var/run/nginx.pid; pid /var/run/nginx.pid;
error_log /dev/stdout info;
events { events {
worker_connections 1024; worker_connections 1024;
} }
http { http {
access_log /dev/stdout;
include /etc/nginx/mime.types; include /etc/nginx/mime.types;
default_type application/octet-stream; default_type application/octet-stream;