Compare commits

..

No commits in common. "fix_docker_stuff" and "master" have entirely different histories.

6 changed files with 45 additions and 50 deletions

View File

@ -1,3 +0,0 @@
/external
Makefile
*.md

View File

@ -1,17 +1,24 @@
FROM golang:1.15 FROM golang:1.15 AS builder
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
COPY . /broadcast/ COPY ./go.* /broadcast/
COPY /*.go /broadcast/
WORKDIR /broadcast WORKDIR /broadcast
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y libmp3lame-dev procps \ && apt-get install -y libmp3lame-dev\
&& env go build -o /broadcast/broadcast \ && go get -u ./... \
&& cp /broadcast/broadcast /srv/ \
&& cp /broadcast/entrypoint.sh /srv/ \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
WORKDIR /srv # RUN env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /broadcast/broadcast
RUN env go build -o /broadcast/broadcast
# RUN go build -o /broadcast/broadcast
ENTRYPOINT ["/srv/entrypoint.sh"] # FROM alpine:latest
FROM golang:1.15
WORKDIR /srv
COPY --from=builder /broadcast/broadcast /srv/broadcast
CMD /srv/broadcast

View File

@ -1,6 +0,0 @@
#!/bin/bash
trap "exit 0" 1 2 3 15
sleep 5
/srv/broadcast ${@} & wait

View File

@ -1,7 +0,0 @@
version: "3"
services:
broadcast:
depends_on: []
environment:
- MUMBLE_SERVER: parla.abbiamoundominio.org:64738

View File

@ -3,32 +3,32 @@ version: "3"
services: services:
broadcast: broadcast:
image: unit/broadcast image: unit/broadcast
build: broadcast/ build: .
depends_on: # depends_on:
- mumble # - mumble
environment: environment:
MUMBLE_SERVER: mumble:64738 - MUMBLE_SERVER: parla.abbiamoundominio.org:64738
icecast: # icecast:
image: infiniteproject/icecast # image: infiniteproject/icecast
ports: # ports:
- "8000:80" # - "8000:80"
healthcheck: # healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"] # test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 30s # interval: 30s
timeout: 1s # timeout: 1s
retries: 3 # retries: 3
start_period: 4s # start_period: 4s
mumble: # mumble:
image: coppit/mumble-server # image: coppit/mumble-server
ports: # ports:
- "64738:64738" # - "64738:64738"
volumes: # volumes:
- $PWD/mumble:/data # - $PWD/mumble:/data
healthcheck: # healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:64738"] # test: ["CMD", "curl", "-f", "http://localhost:64738"]
interval: 30s # interval: 30s
timeout: 1s # timeout: 1s
retries: 3 # retries: 3
start_period: 4s # start_period: 4s

4
entrypoint.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
sleep 5
/srv/broadcast ${@}