Skip to content

Commit ee998e7

Browse files
committed
Restructured repository
1 parent f7334fa commit ee998e7

File tree

5 files changed

+63
-0
lines changed

5 files changed

+63
-0
lines changed

.idea/CSC482-Server.iml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Start tho Go app build
2+
FROM golang:latest AS build
3+
4+
# Copy source
5+
WORKDIR /go/src/server
6+
COPY . .
7+
8+
# Get required modules (assumes packages have been added to ./vendor
9+
RUN go get -d -v ./...
10+
11+
# Build a statcally-linked Go binary for Linux
12+
RUN CGO_ENABLED=0 GOOS=linux go build -a -o main .
13+
14+
# New build phase -- create binary-only image
15+
FROM alpine:latest
16+
17+
# Add support for HTTPS and time zones
18+
RUN apk update && \
19+
apk upgrade && \
20+
apk add ca-certificates
21+
22+
WORKDIR /root/
23+
24+
# Copy files from prvious build container
25+
COPY --from=build /go/src/server/main ./
26+
27+
# Add environment variables
28+
ENV AWS_ACCESS_KEY_ID AKIA34XNLPJYJ2SSHJUN
29+
ENV AWS_SECRET_ACCESS_KEY 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
30+
31+
# Check results
32+
RUN env && pwd && find .
33+
34+
# Start the application
35+
CMD ["./main"]

0 commit comments

Comments
 (0)