mirror of
https://github.com/bitvora/wot-relay.git
synced 2025-06-06 18:31:05 +00:00
dockerfiles with tag for badgerdb
This commit is contained in:
parent
b8ae4a5ccb
commit
7fa90fa885
31
arm64.Dockerfile
Normal file
31
arm64.Dockerfile
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
# Use Golang image based on Debian Bookworm
|
||||||
|
FROM golang:bookworm
|
||||||
|
|
||||||
|
# Set the working directory within the container
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy go.mod and go.sum files
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
|
||||||
|
# Download dependencies
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
# Copy the rest of the application source code
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Set fixed environment variables
|
||||||
|
ENV DB_PATH="db"
|
||||||
|
ENV INDEX_PATH="templates/index.html"
|
||||||
|
ENV STATIC_PATH="templates/static"
|
||||||
|
|
||||||
|
# touch a .env (https://github.com/bitvora/wot-relay/pull/4)
|
||||||
|
RUN touch .env
|
||||||
|
|
||||||
|
# Build the Go application
|
||||||
|
RUN go build -tags badger -o main .
|
||||||
|
|
||||||
|
# Expose the port that the application will run on
|
||||||
|
EXPOSE 3334
|
||||||
|
|
||||||
|
# Set the command to run the executable
|
||||||
|
CMD ["./main"]
|
14
docker-compose.arm64.yml
Normal file
14
docker-compose.arm64.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
services:
|
||||||
|
relay:
|
||||||
|
container_name: wot-relay
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: arm64.Dockerfile
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- "./db:/app/db" # only change the left side before the colon
|
||||||
|
- "./templates/index.html:/app/templates/index.html" # only change the left side before the colon
|
||||||
|
- "./templates/static:/app/templates/static" # only change the left side before the colon
|
||||||
|
ports:
|
||||||
|
- "3334:3334"
|
Loading…
x
Reference in New Issue
Block a user