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
|
||||
|
||||
COPY ./go.* /broadcast/
|
||||
COPY /*.go /broadcast/
|
||||
COPY . /broadcast/
|
||||
|
||||
WORKDIR /broadcast
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libmp3lame-dev\
|
||||
&& go get -u ./... \
|
||||
&& apt-get install -y libmp3lame-dev procps \
|
||||
&& env go build -o /broadcast/broadcast \
|
||||
&& cp /broadcast/broadcast /srv/ \
|
||||
&& cp /broadcast/entrypoint.sh /srv/ \
|
||||
&& 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
|
||||
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:
|
||||
broadcast:
|
||||
image: unit/broadcast
|
||||
build: .
|
||||
# depends_on:
|
||||
# - mumble
|
||||
build: broadcast/
|
||||
depends_on:
|
||||
- mumble
|
||||
environment:
|
||||
- MUMBLE_SERVER: parla.abbiamoundominio.org:64738
|
||||
MUMBLE_SERVER: mumble:64738
|
||||
|
||||
# icecast:
|
||||
# image: infiniteproject/icecast
|
||||
# ports:
|
||||
# - "8000:80"
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
||||
# interval: 30s
|
||||
# timeout: 1s
|
||||
# retries: 3
|
||||
# start_period: 4s
|
||||
icecast:
|
||||
image: infiniteproject/icecast
|
||||
ports:
|
||||
- "8000:80"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000"]
|
||||
interval: 30s
|
||||
timeout: 1s
|
||||
retries: 3
|
||||
start_period: 4s
|
||||
|
||||
# mumble:
|
||||
# image: coppit/mumble-server
|
||||
# ports:
|
||||
# - "64738:64738"
|
||||
# volumes:
|
||||
# - $PWD/mumble:/data
|
||||
# healthcheck:
|
||||
# test: ["CMD", "curl", "-f", "http://localhost:64738"]
|
||||
# interval: 30s
|
||||
# timeout: 1s
|
||||
# retries: 3
|
||||
# start_period: 4s
|
||||
mumble:
|
||||
image: coppit/mumble-server
|
||||
ports:
|
||||
- "64738:64738"
|
||||
volumes:
|
||||
- $PWD/mumble:/data
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:64738"]
|
||||
interval: 30s
|
||||
timeout: 1s
|
||||
retries: 3
|
||||
start_period: 4s
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
sleep 5
|
||||
/srv/broadcast ${@}
|
Loading…
Reference in New Issue
Block a user