dockerized the app
This commit is contained in:
parent
85c13896b2
commit
9d947e1e37
3 changed files with 36 additions and 0 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
|||
/assets/
|
||||
/assets/*
|
||||
.env
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -0,0 +1,15 @@
|
|||
FROM golang:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN go build -o azote .
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./azote"]
|
18
docker-compose.yml
Normal file
18
docker-compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
|||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
image: ouldhamounabil/azote-backend
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
DSN: "${DSN}"
|
||||
JWT_SECRET: "${JWT_SECRET}"
|
||||
GIN_MODE: "${GIN_MODE}"
|
||||
volumes:
|
||||
- assets:/app/assets
|
||||
|
||||
volumes:
|
||||
assets:
|
Loading…
Add table
Reference in a new issue