mirror of
https://github.com/Eugeny/tabby-web.git
synced 2025-06-07 21:19:53 +00:00
docker: use platform-specific dockerize build - fixes #43
This commit is contained in:
parent
533ad46c96
commit
5d94835d7d
11
Dockerfile
11
Dockerfile
@ -43,8 +43,15 @@ RUN FRONTEND_BUILD_DIR=/frontend /venv/*/bin/python ./manage.py add_version ${BU
|
||||
|
||||
FROM python:3.7-alpine AS backend
|
||||
|
||||
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait
|
||||
RUN chmod +x /wait
|
||||
ENV DOCKERIZE_VERSION v0.6.1
|
||||
ARG TARGETPLATFORM
|
||||
RUN if [ "$TARGETPLATFORM" = "arm64" ]; \
|
||||
then export DOCKERIZE_ARCH=armhf; \
|
||||
else export DOCKERIZE_ARCH=amd64; \
|
||||
fi
|
||||
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-$DOCKERIZE_ARCH-$DOCKERIZE_VERSION.tar.gz \
|
||||
&& tar -C /usr/local/bin -xzvf dockerize-linux-$DOCKERIZE_ARCH-$DOCKERIZE_VERSION.tar.gz \
|
||||
&& rm dockerize-linux-$DOCKERIZE_ARCH-$DOCKERIZE_VERSION.tar.gz
|
||||
|
||||
RUN apk add mariadb-connector-c
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
/wait
|
||||
if [ -z "$var" ]; then
|
||||
dockerize $DOCKERIZE_ARGS
|
||||
fi
|
||||
cd /app
|
||||
/venv/*/bin/python ./manage.py migrate
|
||||
/venv/*/bin/gunicorn
|
||||
|
@ -14,7 +14,7 @@ services:
|
||||
- ENABLE_HOMEPAGE=False
|
||||
- DEBUG=False
|
||||
- APP_DIST_STORAGE=file:///app-dist
|
||||
- WAIT_HOSTS=db:3306
|
||||
- DOCKERIZE_ARGS="-wait tcp://db:3306 -timeout 60s"
|
||||
|
||||
db:
|
||||
image: mariadb:10.7.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user