Docker: Upgrade NPM before starting production build
This commit is contained in:
parent
628147a881
commit
ef5c7a30ad
3 changed files with 9 additions and 9 deletions
14
Makefile
14
Makefile
|
@ -42,14 +42,10 @@ fmt: fmt-js fmt-go
|
|||
upgrade: dep-upgrade-js dep-upgrade
|
||||
clean-local: clean-local-config clean-local-cache
|
||||
clean-install: clean-local dep build-js install-bin install-assets
|
||||
dev: dev-npm dev-go-amd64
|
||||
dev-npm:
|
||||
$(info Upgrading NPM in local dev environment...)
|
||||
dev: npm install-go-amd64
|
||||
npm:
|
||||
$(info Upgrading NPM version...)
|
||||
sudo npm update -g npm
|
||||
dev-go-amd64:
|
||||
$(info Installing Go in local AMD64 dev environment...)
|
||||
sudo docker/scripts/install-go.sh amd64
|
||||
go build -v ./...
|
||||
acceptance-restart:
|
||||
cp -f storage/acceptance/backup.db storage/acceptance/index.db
|
||||
cp -f storage/acceptance/config/settingsBackup.yml storage/acceptance/config/settings.yml
|
||||
|
@ -87,6 +83,10 @@ generate:
|
|||
@if [ ${$(shell git diff --shortstat assets/locales/messages.pot):1:45} == $(POT_UNCHANGED) ]; then\
|
||||
git checkout -- assets/locales/messages.pot;\
|
||||
fi
|
||||
install-go-amd64:
|
||||
$(info Installing Go (AMD64)...)
|
||||
sudo docker/scripts/install-go.sh amd64
|
||||
go build -v ./...
|
||||
install-bin:
|
||||
scripts/build.sh prod ~/.local/bin/$(BINARY_NAME)
|
||||
install-assets:
|
||||
|
|
|
@ -12,7 +12,7 @@ WORKDIR "/go/src/github.com/photoprism/photoprism"
|
|||
COPY . .
|
||||
|
||||
# Build frontend and backend
|
||||
RUN make dep build-js install
|
||||
RUN make npm dep build-js install
|
||||
|
||||
################################################## PRODUCTION STAGE ####################################################
|
||||
FROM ubuntu:21.10
|
||||
|
|
|
@ -12,7 +12,7 @@ WORKDIR "/go/src/github.com/photoprism/photoprism"
|
|||
COPY . .
|
||||
|
||||
# Build frontend and backend
|
||||
RUN make dep build-js install
|
||||
RUN make npm dep build-js install
|
||||
|
||||
################################################## PRODUCTION STAGE ####################################################
|
||||
FROM ubuntu:21.10
|
||||
|
|
Loading…
Reference in a new issue