-
Notifications
You must be signed in to change notification settings - Fork 4
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
jon4h
committed
May 16, 2021
1 parent
ba312f0
commit 3640370
Showing
8 changed files
with
78 additions
and
8 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,12 @@ | ||
# meta | ||
.idea | ||
.vscode | ||
.github | ||
|
||
# data | ||
data/database.db | ||
config/config.yml | ||
.env | ||
|
||
# other | ||
notes.txt |
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 |
---|---|---|
|
@@ -3,8 +3,9 @@ | |
.vscode | ||
|
||
# data | ||
database.db | ||
data/database.db | ||
config/config.yml | ||
.env | ||
|
||
# other | ||
notes.txt | ||
|
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 |
---|---|---|
@@ -1,9 +1,16 @@ | ||
FROM golang:alpine | ||
FROM golang:alpine as builder | ||
RUN mkdir /app | ||
ADD . /app/ | ||
WORKDIR /app | ||
RUN apk add --no-cache gcc musl-dev | ||
RUN go build -o cornix-tv-forwarder . | ||
RUN adduser -S -D -H -h /app appuser | ||
USER appuser | ||
CMD ["./cornix-tv-forwarder"] | ||
# add build dependencies | ||
RUN apk add --no-cache gcc musl-dev upx | ||
# build the binary | ||
RUN go build -o cornix-tv-channel -ldflags="-s" . | ||
# compress the binary | ||
RUN upx -9 -k cornix-tv-channel | ||
|
||
# build the runtime image (apline because of cgo dependecies) | ||
FROM alpine:latest | ||
COPY --from=builder /app/cornix-tv-channel . | ||
EXPOSE 3000 | ||
ENTRYPOINT [ "./cornix-tv-channel" ] |
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,16 @@ | ||
FROM golang:alpine as builder | ||
RUN mkdir /app | ||
ADD . /app/ | ||
WORKDIR /app | ||
# add build dependencies | ||
RUN apk add --no-cache gcc musl-dev upx | ||
# build the binary | ||
RUN go build -o cornix-tv-channel -ldflags="-s" . | ||
# compress the binary | ||
RUN upx -9 -k cornix-tv-channel | ||
|
||
# build an empty container | ||
FROM alpine:latest | ||
COPY --from=builder /app/cornix-tv-channel . | ||
EXPOSE 3000 | ||
ENTRYPOINT [ "./cornix-tv-channel" ] |
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
Empty file.
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,16 @@ | ||
--- | ||
version: '3.7' | ||
services: | ||
cornix-tv-channel: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.dev | ||
restart: unless-stopped | ||
hostname: cornix-tv-channel | ||
container_name: cornix-tv-channel | ||
volumes: | ||
- ./data:/data | ||
env_file: | ||
- .env | ||
ports: | ||
- 3000:3000 |
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,18 @@ | ||
--- | ||
version: '3.7' | ||
services: | ||
cornix-tv-channel: | ||
image: jon4hz/cornix-tv-channel | ||
restart: unless-stopped | ||
hostname: cornix-tv-channel | ||
container_name: cornix-tv-channel | ||
volumes: | ||
- ./data:/data | ||
env_file: | ||
- .env | ||
networks: | ||
traefik_proxy: | ||
|
||
networks: | ||
traefik_proxy: | ||
external: true |