Skip to content

Commit

Permalink
Reorganize project structure to separate backend
Browse files Browse the repository at this point in the history
  • Loading branch information
olzhasar committed Mar 12, 2024
1 parent 5420d8c commit 524b1ab
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
frontend/
gochat
*_test.go
assets
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ ARG GO_VERSION=1
FROM golang:${GO_VERSION}-alpine as builder

WORKDIR /usr/src/app
COPY go.mod go.sum ./
COPY ./backend/go.mod ./backend/go.sum ./
RUN go mod download && go mod verify
COPY . .
RUN go build -v -o /run-app .
COPY backend .
RUN go build -v -o /run-app ./cmd/


FROM alpine:latest
Expand Down
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
run:
go run .

build:
go build -o gochat .

test:
go test -v ./...

deploy:
flyctl deploy

.PHONY: run build test deploy
.PHONY: deploy
10 changes: 10 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
run:
go run ./cmd/

build:
go build -o gochat ./cmd/

test:
go test -v ./cmd/...

.PHONY: run build test
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 524b1ab

Please sign in to comment.