Skip to content

Commit

Permalink
Updated Terraria resources to include new Taskfile format
Browse files Browse the repository at this point in the history
  • Loading branch information
gruberdev committed Mar 29, 2024
1 parent 459b8a6 commit 07b9102
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
25 changes: 12 additions & 13 deletions servers/terraria/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM golang:1.19.1 as builder
FROM golang:1.22 as builder

# Update package lists and install unzip and curl
RUN apt-get update \
Expand All @@ -17,26 +17,25 @@ RUN go mod tidy && go build -o wrapper .
FROM mono:slim

# Add OCI annotations for the image
LABEL org.opencontainers.image.authors="gruberdev <[email protected]>"
LABEL org.opencontainers.image.authors="gruberdev <[email protected]>"
LABEL org.opencontainers.image.url="https://github.com/gruberdev/gaming/blob/main/servers/terraria"
LABEL org.opencontainers.image.documentation="https://github.com/gruberdev/gaming/blob/main/servers/terraria/README.md"
LABEL org.opencontainers.image.source="https://github.com/gruberdev/gaming.git"
LABEL org.opencontainers.image.version="v1.4.4.9"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.title="Terraria (Agones version)"
LABEL org.opencontainers.image.description DESCRIPTION="Terraria dedicated servers with Agones integration."

# Set build argument for Terraria version
ARG TERRARIA_VERSION=1.4.4.9
ARG VERSION=1.0.0.0

# Set environment variables for server configuration
ENV TERRARIA_MOTD="A server powered by Kubernetes and Agones!"
ENV TERRARIA_PASS=""
ENV TERRARIA_MAXPLAYERS="16"
ENV TERRARIA_WORLDNAME="Example"
ENV TERRARIA_WORLDSIZE="3"
ENV TERRARIA_WORLDSEED="Docker"
ENV TERRARIA_USECONFIGFILE="No"
ENV TERRARIA_MOTD="A server powered by Kubernetes and Agones!" \
TERRARIA_PASS="" \
TERRARIA_MAXPLAYERS="16" \
TERRARIA_WORLDNAME="Example" \
TERRARIA_WORLDSIZE="3" \
TERRARIA_WORLDSEED="Docker" \
TERRARIA_USECONFIGFILE="No" \
VERSION="$VERSION"

# Update package lists and install necessary packages, then clean up
RUN apt-get update && \
Expand All @@ -48,7 +47,7 @@ RUN apt-get update && \
WORKDIR /server

# Download and unzip the Terraria server files
RUN TERRARIA_DOWNLOAD=$(echo $TERRARIA_VERSION | tr -d '.') && \
RUN TERRARIA_DOWNLOAD=$(echo ${VERSION} | tr -d '.') && \
echo ${TERRARIA_DOWNLOAD} && \
wget https://terraria.org/api/download/pc-dedicated-server/terraria-server-${TERRARIA_DOWNLOAD}.zip \
-O terraria.zip && \
Expand Down
2 changes: 2 additions & 0 deletions servers/terraria/image/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ else
echo -e "Max Players set to: $TERRARIA_MAXPLAYERS"
echo -e "Server Password set to: $TERRARIA_PASS"
echo -e "MOTD Set to: $TERRARIA_MOTD"
echo -e "Server version: $VERSION"

fi

# If config, we supply it at the command line.
Expand Down
2 changes: 1 addition & 1 deletion servers/terraria/image/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module terraria

go 1.19
go 1.21

require agones.dev/agones v1.30.0

Expand Down
6 changes: 6 additions & 0 deletions servers/terraria/image/go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
agones.dev/agones v1.30.0 h1:BDwCQhXko7cVyJrkvs0/C9SGQDR91Fsg+z477blRseg=
agones.dev/agones v1.30.0/go.mod h1:vkKAtL3sm2Sj2/+Y0uAKW1YE02H0+fBgie2ruiKgSdM=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 h1:kr3j8iIMR4ywO/O0rvksXaJvauGGCMg2zAZIiNZ9uIQ=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0/go.mod h1:ummNFgdgLhhX7aIiy35vVmQNS0rWXknfPE0qe6fmFXg=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc=
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
Expand All @@ -29,3 +34,4 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 07b9102

Please sign in to comment.