feat: Convert cloud dockerfile to work without build step
This commit is contained in:
@@ -1,17 +1,22 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM node:18-alpine
|
FROM node:18-alpine
|
||||||
WORKDIR /automatisch
|
|
||||||
|
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
|
|
||||||
RUN ls -lna
|
RUN \
|
||||||
|
apk --no-cache add --virtual build-dependencies python3 build-base git
|
||||||
|
|
||||||
# copy the app, note .dockerignore
|
RUN git clone -b models-js https://github.com/automatisch/automatisch.git
|
||||||
COPY . ./
|
|
||||||
|
|
||||||
RUN yarn
|
WORKDIR /automatisch
|
||||||
RUN yarn lerna bootstrap
|
|
||||||
RUN yarn lerna run --scope=@*/{web,backend,cli} build
|
RUN yarn install
|
||||||
|
|
||||||
|
RUN cd packages/web && yarn build
|
||||||
|
|
||||||
|
RUN \
|
||||||
|
rm -rf /usr/local/share/.cache/ && \
|
||||||
|
apk del build-dependencies
|
||||||
|
|
||||||
COPY ./docker/entrypoint-cloud.sh /entrypoint-cloud.sh
|
COPY ./docker/entrypoint-cloud.sh /entrypoint-cloud.sh
|
||||||
|
|
||||||
|
@@ -2,8 +2,10 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
cd packages/backend
|
||||||
|
|
||||||
if [ -n "$WORKER" ]; then
|
if [ -n "$WORKER" ]; then
|
||||||
yarn automatisch start-worker
|
yarn start:worker
|
||||||
else
|
else
|
||||||
yarn automatisch start
|
yarn start
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user