Skip to content
Merged
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
70 changes: 35 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# syntax=docker/dockerfile:1

FROM golang:1.22.2

WORKDIR /app

COPY go.mod go.sum ./

RUN go mod download

COPY auth ./auth
COPY config ./config
COPY db ./db
COPY docs ./docs
COPY handlers ./handlers
COPY models ./models
COPY services ./services
COPY setup ./setup
COPY utils ./utils
COPY webhooks ./webhooks
COPY data ./data
COPY web-ui ./web-ui
COPY config.yaml key.pem cert.pem main.go rsakey.pem build.sh run.sh ./

RUN CGO_ENABLED=1 GOOS=linux go build -o dingus-server

# Optional:
# To bind to a TCP port, runtime parameters must be supplied to the docker command.
# But we can document in the Dockerfile what ports
# the application is going to listen on by default.
# https://docs.docker.com/reference/dockerfile/#expose
EXPOSE 443

# Run
CMD ["/app/run.sh"]
# syntax=docker/dockerfile:1
FROM golang:1.22.2
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY auth ./auth
COPY config ./config
COPY db ./db
COPY docs ./docs
COPY handlers ./handlers
COPY models ./models
COPY services ./services
COPY setup ./setup
COPY utils ./utils
COPY webhooks ./webhooks
COPY data ./data
COPY web-ui ./web-ui
COPY config.yaml key.pem cert.pem main.go rsakey.pem build.sh run.sh ./
RUN CGO_ENABLED=1 GOOS=linux go build -o dingus-server
# Optional:
# To bind to a TCP port, runtime parameters must be supplied to the docker command.
# But we can document in the Dockerfile what ports
# the application is going to listen on by default.
# https://docs.docker.com/reference/dockerfile/#expose
EXPOSE 443
# Run
CMD ["/app/run.sh"]
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/sh

export WILD_APRICOT_API_KEY=ilyglbbwzai5suuxt4nai0kqx5evvh
export WILD_APRICOT_API_KEY=v97hk30e4t8qm1nrwb6exsfibiisvy
export WILD_APRICOT_WEBHOOK_TOKEN=08a7gv08abwDYGd77cxv980asdfy98zxc87
export WILD_APRICOT_SSO_CLIENT_ID=t8jw60pj3f
export WILD_APRICOT_SSO_CLIENT_SECRET=5k8nct39ootl8wt0gkpxe22v8phi5a
export WILD_APRICOT_SSO_REDIRECT_URI=/replaceme
export WILD_APRICOT_SSO_CLIENT_ID=654628fgDFc68hH
export WILD_APRICOT_SSO_CLIENT_SECRET=07pb835b7pw3s8r0qrvmtlipuwjtt6
export WILD_APRICOT_SSO_REDIRECT_URI=https://dingus.hackpgh.org/web-ui/home
export LOG_LEVEL=INFO
export COOKIE_STORE_SECRET=cookiestoresecret
export CGO_ENABLED=1
Expand Down
8 changes: 4 additions & 4 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
dingus-server:
build: .
ports:
services:
dingus-server:
build: .
ports:
- "443:443"
1 change: 1 addition & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type Config struct {
CookieStoreSecret string `mapstructure:"cookie_store_secret" json:"cookie_store_secret"`
WildApricotApiKey string
WildApricotWebhookToken string
RFIDFieldName string
log *logrus.Logger
}

Expand Down
9 changes: 5 additions & 4 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/sh

export WILD_APRICOT_API_KEY=ilyglbbwzai5suuxt4nai0kqx5evvh
export WILD_APRICOT_API_KEY=v97hk30e4t8qm1nrwb6exsfibiisvy
export WILD_APRICOT_WEBHOOK_TOKEN=08a7gv08abwDYGd77cxv980asdfy98zxc87
export WILD_APRICOT_SSO_CLIENT_ID=t8jw60pj3f
export WILD_APRICOT_SSO_CLIENT_SECRET=5k8nct39ootl8wt0gkpxe22v8phi5a
export WILD_APRICOT_SSO_REDIRECT_URI=/replaceme
export WILD_APRICOT_SSO_CLIENT_ID=654628fgDFc68hH
export WILD_APRICOT_SSO_CLIENT_SECRET=07pb835b7pw3s8r0qrvmtlipuwjtt6
export WILD_APRICOT_SSO_REDIRECT_URI=https://dingus.hackpgh.org/web-ui/home
#export WILD_APRICOT_SSO_REDIRECT_URI=https://localhost/web-ui/home
export LOG_LEVEL=INFO
export COOKIE_STORE_SECRET=cookiestoresecret
export CGO_ENABLED=1
Expand Down
Loading