Skip to content

Commit

Permalink
get rid of sub module
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Dec 7, 2024
1 parent bf3d574 commit fa32786
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 32 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

23 changes: 7 additions & 16 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.12-alpine as pybuilder
FROM python:3.12-alpine AS pybuilder
RUN apk update && apk add --no-cache tzdata ca-certificates alpine-sdk libressl-dev libffi-dev cargo && \
apk add tiff-dev jpeg-dev openjpeg-dev zlib-dev freetype-dev lcms2-dev \
libwebp-dev tcl-dev tk-dev harfbuzz-dev fribidi-dev libimagequant-dev libxcb-dev libpng-dev
Expand All @@ -7,23 +7,14 @@ COPY requirements.txt /requirements.txt
RUN pip3 install --user -r /requirements.txt && rm /requirements.txt


FROM python:3.12-alpine as runner
FROM python:3.12-alpine AS runner
RUN apk update && apk add --no-cache libressl jpeg-dev openjpeg-dev libimagequant-dev tiff-dev freetype-dev libxcb-dev


FROM node:20-alpine as nodebuilder
WORKDIR /YYeTsBot/YYeTsFE/
ENV NODE_OPTIONS=--openssl-legacy-provider
ARG env
RUN apk add git
COPY YYeTsFE/package.json /YYeTsBot/YYeTsFE/
COPY YYeTsFE/yarn.lock /YYeTsBot/YYeTsFE/
COPY scripts/dev_robots.sh /tmp/
RUN yarn --network-timeout 1000000
COPY YYeTsFE /YYeTsBot/YYeTsFE/
COPY .git /YYeTsBot/.git/
RUN if [ "$env" = "dev" ]; then echo "dev build"; yarn build; sh /tmp/dev_robots.sh; else echo "prod build"; yarn run release; fi

FROM alpine AS nodebuilder
RUN apk add curl jq
RUN wget $(curl -s https://api.github.com/repos/tgbot-collection/YYeTsFE/releases/latest | jq -r '.assets[] | select(.name == "build.zip") | .browser_download_url')
RUN unzip build.zip && rm build.zip

FROM runner
RUN apk add mongodb-tools mysql-client
Expand All @@ -32,7 +23,7 @@ COPY . /YYeTsBot
COPY --from=pybuilder /root/.local /usr/local
COPY --from=pybuilder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=pybuilder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=nodebuilder /YYeTsBot/YYeTsFE/build /YYeTsBot/yyetsweb/templates/
COPY --from=nodebuilder /build /YYeTsBot/yyetsweb/templates/

ENV TZ=Asia/Shanghai
WORKDIR /YYeTsBot/yyetsbot
Expand Down
1 change: 0 additions & 1 deletion YYeTsFE
Submodule YYeTsFE deleted from 5807eb
4 changes: 0 additions & 4 deletions scripts/dev_robots.sh

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/pre_build.sh

This file was deleted.

0 comments on commit fa32786

Please sign in to comment.