Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup repository and update to go mod #21

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ feed\.rss
.travis\.yml

_config\.yml

Dockerfile

assets/
31 changes: 31 additions & 0 deletions .github/workflows/dev-docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: push gmemstr/pogo:dev

on:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/dev-docker-build-push.yml'
branches-ignore:
- 'master'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: gmemstr
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/gmemstr/pogo:dev
31 changes: 31 additions & 0 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: push gmemstr/pogo:stable

on:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/docker-build-push.yml'
branches:
- 'master'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: gmemstr
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/gmemstr/pogo:stable
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ assets/config/users\.db
run\.lockfile

\.lock

assets/
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

43 changes: 18 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# Use latest golang image
FROM golang:latest

RUN mkdir -p /go/src \
&& mkdir -p /go/bin \
&& mkdir -p /go/pkg
ENV GOPATH=/go
ENV PATH=$GOPATH/bin:$PATH

# Set working directory
WORKDIR $GOPATH/src/github.com/gmemstr/pogo

# Add source to container so we can build
ADD . $GOPATH/src/github.com/gmemstr/pogo

# 1. Install make and dependencies
# 2. Install Go dependencies
# 3. Build named Linux binary and allow execution
# 4. List directory structure (for debugging really)\
# 5. Make empty podcast direcory
# 6. Create empty feed files
RUN go get github.com/tools/godep && \
godep restore && \
go build -o pogoapp && chmod +x pogoapp
FROM golang:stretch as builder

WORKDIR /build/pogo
COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN GOOS=linux go build -ldflags "-s -w"


FROM debian:stretch-slim

RUN apt update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

WORKDIR /app
EXPOSE 3000

CMD ./pogoapp
COPY --from=builder /build/pogo/pogo pogo

ENTRYPOINT ["/app/pogo"]
51 changes: 0 additions & 51 deletions Godeps/Godeps.json

This file was deleted.

5 changes: 0 additions & 5 deletions Godeps/Readme

This file was deleted.

8 changes: 0 additions & 8 deletions assets/config/config.json

This file was deleted.

7 changes: 0 additions & 7 deletions assets/web/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions assets/web/admin.html

This file was deleted.

81 changes: 0 additions & 81 deletions assets/web/index.html

This file was deleted.

25 changes: 0 additions & 25 deletions assets/web/login.html

This file was deleted.

Loading