Fix docker stuff
This commit is contained in:
parent
8fa584775f
commit
1b89548f64
3
broadcast/.dockerignore
Normal file
3
broadcast/.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
/external
|
||||||
|
Makefile
|
||||||
|
*.md
|
|
@ -1,24 +1,17 @@
|
||||||
FROM golang:1.15 AS builder
|
FROM golang:1.15
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
COPY ./go.* /broadcast/
|
COPY . /broadcast/
|
||||||
COPY /*.go /broadcast/
|
|
||||||
|
|
||||||
WORKDIR /broadcast
|
WORKDIR /broadcast
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y libmp3lame-dev\
|
&& apt-get install -y libmp3lame-dev procps \
|
||||||
&& go get -u ./... \
|
&& env go build -o /broadcast/broadcast \
|
||||||
|
&& cp /broadcast/broadcast /srv/ \
|
||||||
|
&& cp /broadcast/entrypoint.sh /srv/ \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# FROM alpine:latest
|
|
||||||
FROM golang:1.15
|
|
||||||
|
|
||||||
WORKDIR /srv
|
WORKDIR /srv
|
||||||
COPY --from=builder /broadcast/broadcast /srv/broadcast
|
|
||||||
|
|
||||||
CMD /srv/broadcast
|
ENTRYPOINT ["/srv/entrypoint.sh"]
|
||||||
|
|
6
broadcast/entrypoint.sh
Executable file
6
broadcast/entrypoint.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
trap "exit 0" 1 2 3 15
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
/srv/broadcast ${@} & wait
|
7
docker-compose.prod.yml
Normal file
7
docker-compose.prod.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
version: "3"
|
||||||
|
|
||||||
|
services:
|
||||||
|
broadcast:
|
||||||
|
depends_on: []
|
||||||
|
environment:
|
||||||
|
- MUMBLE_SERVER: parla.abbiamoundominio.org:64738
|
|
@ -3,32 +3,32 @@ version: "3"
|
||||||
services:
|
services:
|
||||||
broadcast:
|
broadcast:
|
||||||
image: unit/broadcast
|
image: unit/broadcast
|
||||||
build: .
|
build: broadcast/
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - mumble
|
- mumble
|
||||||
environment:
|
environment:
|
||||||
- MUMBLE_SERVER: parla.abbiamoundominio.org:64738
|
MUMBLE_SERVER: mumble: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
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
sleep 5
|
|
||||||
/srv/broadcast ${@}
|
|
Loading…
Reference in New Issue
Block a user