mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-03-29 18:31:36 +00:00
Merge branch 'dockerfile_install_packagezs' into 'develop'
backend dockerfile: install packages properly instead of setting python path See merge request baserow/baserow!2463
This commit is contained in:
commit
1b5094569a
2 changed files with 20 additions and 5 deletions
18
Makefile
18
Makefile
|
@ -8,12 +8,13 @@ SHELL=/bin/bash
|
|||
WORKDIR:=$(shell $(REALPATH) $(shell pwd))
|
||||
|
||||
SUBDIRS:=backend web-frontend
|
||||
DOCKERC:=docker compose
|
||||
DOCKERCLI:=docker
|
||||
DOCKERC:=$(DOCKERCLI) compose
|
||||
|
||||
DOCKER_SPLIT_CONF:=-f docker-compose.yml -f docker-compose.dev.yml
|
||||
|
||||
.PHONY: install build .callsubcmd $(SUBDIRS) help package-build test tests\
|
||||
lint lint-fix \
|
||||
lint lint-fix docker-lint\
|
||||
docker-status docker-build docker-start docker-clean docker-stop docker-kill \
|
||||
deps deps-upgrade \
|
||||
clean clean-all
|
||||
|
@ -65,7 +66,7 @@ package-build: SUBCMD=package-build
|
|||
package-build: .subcmd
|
||||
|
||||
lint: SUBCMD=lint
|
||||
lint: .subcmd
|
||||
lint: .subcmd docker-lint
|
||||
|
||||
lint-fix: SUBCMD=lint-fix
|
||||
lint-fix: .subcmd
|
||||
|
@ -105,6 +106,17 @@ docker-kill: .docker-kill
|
|||
docker-clean: DOCKER_CONFIG_FILES=$(DOCKER_SPLIT_CONF)
|
||||
docker-clean: docker-stop .docker-clean
|
||||
|
||||
docker-lint:
|
||||
$(DOCKERCLI) run --rm -i -v "$(shell pwd)":/opt/hadolint/. -w /opt/hadolint \
|
||||
hadolint/hadolint:2.9.3-debian \
|
||||
hadolint -f tty \
|
||||
--ignore DL3008 \
|
||||
backend/Dockerfile \
|
||||
web-frontend/Dockerfile \
|
||||
heroku.Dockerfile \
|
||||
e2e-tests/Dockerfile \
|
||||
deploy/*/Dockerfile
|
||||
|
||||
clean: SUBCMD=clean
|
||||
clean: .subcmd docker-clean
|
||||
|
||||
|
|
|
@ -85,11 +85,14 @@ WORKDIR /baserow/backend
|
|||
# Ensure that Python outputs everything that's printed inside
|
||||
# the application rather than buffering it.
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
ENV PYTHONPATH $PYTHONPATH:/baserow/backend/src:/baserow/premium/backend/src:/baserow/enterprise/backend/src
|
||||
|
||||
COPY --chown=$UID:$GID ./deploy/plugins/*.sh /baserow/plugins/
|
||||
|
||||
RUN dos2unix /baserow/backend/docker/docker-entrypoint.sh && \
|
||||
chmod a+x /baserow/backend/docker/docker-entrypoint.sh
|
||||
chmod a+x /baserow/backend/docker/docker-entrypoint.sh && \
|
||||
/baserow/venv/bin/pip install --no-cache-dir -e /baserow/backend/ && \
|
||||
/baserow/venv/bin/pip install --no-cache-dir -e /baserow/premium/backend/ && \
|
||||
/baserow/venv/bin/pip install --no-cache-dir -e /baserow/enterprise/backend/
|
||||
|
||||
HEALTHCHECK --interval=60s CMD ["/bin/bash", "/baserow/backend/docker/docker-entrypoint.sh", "backend-healthcheck"]
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/bin/bash", "/baserow/backend/docker/docker-entrypoint.sh"]
|
||||
|
|
Loading…
Add table
Reference in a new issue