Improve dev container and taskfile
This commit is contained in:
@@ -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/
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user