Compare commits
No commits in common. "6c77ff58abbe41250e744c7179c2e05cf9ff85b2" and "c8ddafcf66a015032e3ce94f382de328f3f4a0a7" have entirely different histories.
6c77ff58ab
...
c8ddafcf66
@ -1,16 +0,0 @@
|
|||||||
/**
|
|
||||||
!/args
|
|
||||||
!/cmd/africastalking
|
|
||||||
!/cmd/ssh
|
|
||||||
!/config
|
|
||||||
!/debug
|
|
||||||
!/handlers
|
|
||||||
!/internal
|
|
||||||
!/profile
|
|
||||||
!/services
|
|
||||||
!/ssh
|
|
||||||
!/store
|
|
||||||
!/LICENSE
|
|
||||||
!/README.md
|
|
||||||
!/go.*
|
|
||||||
!/.env.example
|
|
||||||
56
.github/workflows/docker.yaml
vendored
56
.github/workflows/docker.yaml
vendored
@ -1,56 +0,0 @@
|
|||||||
name: release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "v*"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
docker:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Check out repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Cache Docker layers
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: /tmp/.buildx-cache
|
|
||||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-buildx-
|
|
||||||
|
|
||||||
- name: Login to GHCR Docker registry
|
|
||||||
uses: docker/login-action@v1
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.repository_owner }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set outputs
|
|
||||||
run: |
|
|
||||||
echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV \
|
|
||||||
&& echo "RELEASE_SHORT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push image
|
|
||||||
uses: docker/build-push-action@v2
|
|
||||||
with:
|
|
||||||
context: ./
|
|
||||||
file: ./Dockerfile
|
|
||||||
platforms: linux/amd64
|
|
||||||
push: true
|
|
||||||
build-args: |
|
|
||||||
BUILD=${{ env.RELEASE_SHORT_COMMIT }}
|
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
|
||||||
tags: |
|
|
||||||
ghcr.io/grassrootseconomics/sarafu-vise:latest
|
|
||||||
ghcr.io/grassrootseconomics/sarafu-vise:${{ env.RELEASE_TAG }}
|
|
||||||
50
Dockerfile
50
Dockerfile
@ -1,50 +0,0 @@
|
|||||||
FROM golang:1.23.4-bookworm AS build
|
|
||||||
|
|
||||||
ENV CGO_ENABLED=1
|
|
||||||
|
|
||||||
ARG BUILDPLATFORM
|
|
||||||
ARG TARGETPLATFORM
|
|
||||||
ARG BUILD=dev
|
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
libgdbm-dev \
|
|
||||||
git \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
RUN git clone https://git.defalsify.org/vise.git go-vise
|
|
||||||
COPY . ./sarafu-vise
|
|
||||||
|
|
||||||
WORKDIR /build/sarafu-vise/services/registration
|
|
||||||
RUN echo "Compiling go-vise files"
|
|
||||||
RUN make VISE_PATH=/build/go-vise -B
|
|
||||||
|
|
||||||
WORKDIR /build/sarafu-vise
|
|
||||||
RUN echo "Building on $BUILDPLATFORM, building for $TARGETPLATFORM"
|
|
||||||
RUN go mod download
|
|
||||||
RUN go build -tags logtrace,online -o sarafu-at -ldflags="-X main.build=${BUILD} -s -w" cmd/africastalking/main.go
|
|
||||||
RUN go build -tags logtrace,online -o sarafu-ssh -ldflags="-X main.build=${BUILD} -s -w" cmd/ssh/main.go
|
|
||||||
|
|
||||||
FROM debian:bookworm-slim
|
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
libgdbm-dev \
|
|
||||||
ca-certificates \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
WORKDIR /service
|
|
||||||
|
|
||||||
COPY --from=build /build/sarafu-vise/sarafu-at .
|
|
||||||
COPY --from=build /build/sarafu-vise/sarafu-ssh .
|
|
||||||
COPY --from=build /build/sarafu-vise/LICENSE .
|
|
||||||
COPY --from=build /build/sarafu-vise/README.md .
|
|
||||||
COPY --from=build /build/sarafu-vise/services ./services
|
|
||||||
COPY --from=build /build/sarafu-vise/.env.example .
|
|
||||||
RUN mv .env.example .env
|
|
||||||
|
|
||||||
EXPOSE 7123
|
|
||||||
EXPOSE 7122
|
|
||||||
|
|
||||||
CMD ["./sarafu-at"]
|
|
||||||
Loading…
Reference in New Issue
Block a user