Skip to content

Commit ed872cb

Browse files
authored
Merge pull request #25 from ABresting/CYBER
fixing the compose file and Dockerfile fixes #23
2 parents 23d2763 + 99821f4 commit ed872cb

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

docker-compose.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ services:
1111
- 23:23
1212
- 8080:8080
1313
env_file:
14-
- ./env./env.prod
15-
16-
17-
14+
- ./env/.env
15+
volumes:
16+
- /tmp/go_app_riot/logs:/app/logger

docker/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ LABEL maintainer="Shreyas Srinivasa <shsr@es.aau.dk>"
99
# Set the Current Working Directory inside the container
1010
WORKDIR /app
1111

12-
# Copy go mod and sum files
13-
COPY go.mod go.sum ./
12+
# Copy the source from the current directory to the Working Directory inside the container
13+
COPY ./riotpot .
14+
15+
# Create the logger directroy for logs generated by the application
16+
RUN mkdir -p ./logger
1417

1518
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
1619
RUN go mod download
1720

18-
# Copy the source from the current directory to the Working Directory inside the container
19-
COPY . .
20-
2121
# Build the Go app
22-
RUN go build -o main .
22+
RUN go build .
2323

2424
# Expose port 8080 to the outside world
2525
EXPOSE 8080
2626

2727
# Command to run the executable
28-
CMD ["./bin/riotpot"]
28+
CMD ["./riotpot"]

0 commit comments

Comments
 (0)