Moved dockerfile to project
This commit is contained in:
parent
8a4fa430ad
commit
0118cc7c73
33
Dockerfile
Normal file
33
Dockerfile
Normal file
@ -0,0 +1,33 @@
|
||||
FROM node:latest AS builder
|
||||
ADD https://git.tanshu.com/api/v1/repos/tanshu/brewman/tags /tags.json
|
||||
RUN git clone --single-branch --depth 1 --branch latest https://git.tanshu.com/tanshu/brewman.git /app
|
||||
WORKDIR /app/overlord
|
||||
RUN npm install --unsafe-perm --legacy-peer-deps && /app/overlord/node_modules/.bin/ng build --prod
|
||||
|
||||
|
||||
FROM python:latest
|
||||
LABEL maintainer="Amritanshu <docker@tanshu.com>"
|
||||
COPY --from=builder /app/brewman /app
|
||||
COPY --from=builder /app/frontend /app/frontend
|
||||
WORKDIR /app
|
||||
|
||||
# Install Poetry
|
||||
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
|
||||
cd /usr/local/bin && \
|
||||
ln -s /opt/poetry/bin/poetry && \
|
||||
poetry config virtualenvs.create false
|
||||
|
||||
# Allow installing dev dependencies to run tests
|
||||
ARG INSTALL_DEV=false
|
||||
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi"
|
||||
|
||||
ENV PYTHONPATH=/app
|
||||
EXPOSE 80
|
||||
VOLUME /frontend
|
||||
|
||||
RUN chmod 777 /app/docker-entrypoint.sh \
|
||||
&& ln -s /app/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh \
|
||||
&& ln -s /app/docker-entrypoint.sh /
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
||||
CMD ["python", "-m", "brewman"]
|
6
brewman/docker-entrypoint.sh
Normal file
6
brewman/docker-entrypoint.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cp /app/frontend/* /frontend
|
||||
|
||||
exec "$@"
|
@ -36,7 +36,7 @@
|
||||
"moment": "^2.29.1",
|
||||
"rxjs": "^6.6.3",
|
||||
"tslib": "^2.0.2",
|
||||
"zone.js": "^0.11.2"
|
||||
"zone.js": "^0.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~0.1002.0",
|
||||
|
Loading…
Reference in New Issue
Block a user