Improve dev container and taskfile
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-04-08 20:14:40 +00:00
parent 9b5119d3dd
commit 6b3026dc8e
16 changed files with 110 additions and 75 deletions

View File

@@ -6,10 +6,10 @@ RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
FROM alpine
RUN apk --no-cache add go nodejs yarn bash curl git git-perl
RUN yarn global add @vue/cli
ENV PATH="/root/.yarn/bin/:${PATH}"
WORKDIR /src/web
ADD web/package.json web/yarn.lock /src/web/
RUN yarn
WORKDIR /src
VOLUME /go
VOLUME /.cache
COPY --from=godeps /root/go/bin/task /root/go/bin/sqlc /root/go/bin/golangci-lint /usr/local/bin/

View File

@@ -6,11 +6,10 @@ services:
command: task -w run
ports:
- 1323:1323
user: '1000'
volumes:
- ~/budgeteer:/src
- ~/.go:/go
- ~/.cache:/.cache
- go-cache:/go
- yarn-cache:/.cache
environment:
BUDGETEER_DB: postgres://budgeteer:budgeteer@db:5432/budgeteer
BUDGETEER_SESSION_SECRET: random string for JWT authorization
@@ -19,13 +18,11 @@ services:
frontend:
image: hub.javil.eu/budgeteer:dev
command: bash -c "cd web; yarn run dev"
command: task frontend-dev
ports:
- 3000:3000
user: '1000'
volumes:
- ~/budgeteer:/src
- ~/.cache:/.cache
depends_on:
- backend
@@ -49,3 +46,5 @@ services:
volumes:
db:
go-cache:
yarn-cache: