Skip to content

Commit

Permalink
Merge branch 'packet_logs' of https://github.com/spr-networks/super i…
Browse files Browse the repository at this point in the history
…nto packet_logs
  • Loading branch information
lts-po committed Aug 11, 2022
2 parents 437fcc2 + 42bddaf commit 56d601b
Show file tree
Hide file tree
Showing 15 changed files with 161 additions and 97 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker Image CI
name: Docker Image ARM64 CI

on:
push:
Expand All @@ -24,13 +24,6 @@ jobs:
-
name: Authenticate to ghcr
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
-
name: Build and push frontend
run: |
docker buildx build frontend -t frontend --output=type=docker
mkdir frontend/output
docker cp $(docker create --rm frontend):/app/build frontend/output/build/
docker buildx build -f frontend/Dockerfile-helper frontend --platform linux/amd64,linux/arm64 -t ghcr.io/spr-networks/super_frontend:latest --push
-
name: Build arm64 test containers
run: |
Expand Down
2 changes: 1 addition & 1 deletion base/scripts/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ else
fi

ret=$?
if [ $ret -neq 0 ]; then
if [ $ret -ne 0 ]; then
echo "Failed to load firewall rules, shutting down upstream interface"
ip link set dev $WANIF down
exit 1
Expand Down
14 changes: 12 additions & 2 deletions build_docker_compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ for SERVICE in $(docker-compose config --service); do
2>/dev/null || echo "false" \
)
if [ "$IS_PREBUILT" = "true" ]; then
IMAGE="ghcr.io/spr-networks/super_${SERVICE}"
echo "Removing prebuilt image ${IMAGE}"
docker image rm "$IMAGE"
docker image rm -f "$IMAGE"
FOUND_PREBUILT_IMAGE=true
fi
done

if [ "$FOUND_PREBUILT_IMAGE" = "true" ]; then
echo "Pruning dangling container images"
docker image prune
docker image prune -f
fi


Expand All @@ -59,3 +60,12 @@ if [ -f .github_creds ]; then
BUILDARGS="--build-arg GITHUB_CREDS=`cat .github_creds`"
fi
docker-compose build ${BUILDARGS} $@

ret=$?

if [ "$ret" -ne "0" ]; then
echo "Tip: if the build failed to resovle domain names,"
echo "consider running ./base/docker_nftables_setup.sh"
echo "since iptables has been disabled for docker in the"
echo "SPR installer"
fi
3 changes: 3 additions & 0 deletions dhcp/scripts/client.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
. /configs/base/config.sh
if [ "$RUN_WAN_DHCP" ]; then
# workaround for coredhcp bug
ip addr add dev $WANIF 192.168.250.250/32
/coredhcp_client -d -i $WANIF -v $RUN_WAN_DHCP_IPV
ip addr del dev $WANIF 192.168.250.250/32
fi
51 changes: 31 additions & 20 deletions docker-compose-virt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,26 @@ services:
base-virt:
container_name: superbase-virt
image: ghcr.io/spr-networks/super_base
build: base
build:
context: base
labels: *default-labels
privileged: true
ports:
- "5353:53"
- "51280:51280/udp"
- "8000:80"
- "4443:443"
labels: *default-labels
logging: *default-logging
volumes:
- ./configs/base/:/configs/base/
superd-virt:
container_name: superd-virt
image: ghcr.io/spr-networks/super_superd
build: superd
build:
context: superd
labels: *default-labels
network_mode: host
privileged: true
labels: *default-labels
logging: *default-logging
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
Expand All @@ -44,11 +46,12 @@ services:
dhcp-virt:
container_name: superdhcp-virt
image: ghcr.io/spr-networks/super_dhcp
build: dhcp
build:
context: dhcp
labels: *default-labels
network_mode: service:base-virt
depends_on:
- "base-virt"
labels: *default-labels
logging: *default-logging
volumes:
- ./configs/base/:/configs/base/
Expand All @@ -59,9 +62,10 @@ services:
dns-virt:
container_name: superdns-virt
image: ghcr.io/spr-networks/super_dns
build: dns
build:
context: dns
labels: *default-labels
network_mode: service:base-virt
labels: *default-labels
logging: *default-logging
depends_on:
- "base-virt"
Expand All @@ -73,19 +77,22 @@ services:
multicast_udp_proxy-virt:
container_name: super_multicast_udp_proxy-virt
image: ghcr.io/spr-networks/super_multicast_udp_proxy
build: multicast_udp_proxy
build:
context: multicast_udp_proxy
labels: *default-labels
network_mode: service:base-virt
depends_on:
- "base-virt"
labels: *default-labels
logging: *default-logging
volumes:
- ./configs/base/:/configs/base/
- ./state/public/:/state/public/:ro
wireguard-virt:
container_name: superwireguard-virt
image: ghcr.io/spr-networks/super_wireguard
build: wireguard
build:
context: wireguard
labels: *default-labels
network_mode: service:base-virt
cap_add:
- net_admin
Expand All @@ -94,7 +101,6 @@ services:
- "base-virt"
- "dhcp-virt"
- "api-virt"
labels: *default-labels
logging: *default-logging
volumes:
- ./configs/base/:/configs/base/
Expand All @@ -104,15 +110,19 @@ services:
frontend:
container_name: superfrontend
image: ghcr.io/spr-networks/super_frontend
entrypoint: ["cp", "-RT", "/build/", "/frontend/build"]
build: frontend
entrypoint: ["cp", "-RT", "/app/build/", "/frontend/build"]
build:
context: frontend
labels: *default-labels
network_mode: none
volumes:
- ./frontend/:/frontend
api-virt:
container_name: superapi-virt
image: ghcr.io/spr-networks/super_api
build: api
build:
context: api
labels: *default-labels
network_mode: service:base-virt
cap_add:
- net_admin
Expand All @@ -122,7 +132,6 @@ services:
- "dhcp-virt"
- "frontend"
- "superd-virt"
labels: *default-labels
logging: *default-logging
volumes:
- ./configs/base/:/configs/base/
Expand All @@ -142,9 +151,10 @@ services:
plugin-lookup-virt:
container_name: super-plugin-lookup-virt
image: ghcr.io/spr-networks/super_plugin-lookup
build: plugin-lookup
build:
context: plugin-lookup
labels: *default-labels
network_mode: service:base-virt
labels: *default-labels
logging: *default-logging
depends_on:
- "base-virt"
Expand All @@ -154,9 +164,10 @@ services:
dyndns-virt:
container_name: superdyndns-virt
image: ghcr.io/spr-networks/super_dyndns
build: dyndns
build:
context: dyndns
labels: *default-labels
network_mode: bridge
labels: *default-labels
logging: *default-logging
depends_on:
- "base-virt"
Expand Down
Loading

0 comments on commit 56d601b

Please sign in to comment.