forked from synctv-org/synctv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b1856f
commit ed7dd1e
Showing
6 changed files
with
135 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: release_docker | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release_docker: | ||
name: Release Docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: synctvorg/synctv | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
platforms: linux/amd64,linux/arm64,darwin/amd64,darwin/arm64,windows/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From alpine:latest as builder | ||
|
||
ARG VERSION=v0.0.0 | ||
|
||
WORKDIR /synctv | ||
|
||
COPY ./ ./ | ||
|
||
RUN apk add --no-cache bash curl gcc git go musl-dev | ||
|
||
RUN bash build.sh -P -v ${VERSION} -b build | ||
|
||
From alpine:latest | ||
|
||
WORKDIR /opt/synctv | ||
|
||
ENV SERVER_LISTEN=0.0.0.0 | ||
|
||
ENV SERVER_PORT=8080 | ||
|
||
COPY --from=builder /synctv/build/synctv /usr/local/bin/synctv | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN apk add --no-cache bash ca-certificates su-exec tzdata | ||
|
||
RUN chmod +x /entrypoint.sh | ||
|
||
ENV PUID=0 PGID=0 UMASK=022 | ||
|
||
EXPOSE 8080 8080 | ||
|
||
CMD [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
chown -R ${PUID}:${PGID} /opt/synctv/ | ||
|
||
umask ${UMASK} | ||
|
||
exec su-exec ${PUID}:${PGID} synctv server --env-no-prefix --skip-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters