Files
front/Dockerfile
T
legonzaur cb74d78928
release-tag / release-image (push) Failing after 11s
fix : update dockerfile
2024-08-06 13:38:40 +02:00

32 lines
1.0 KiB
Docker

FROM node:lts-alpine AS install-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
FROM git.legonzaur.fr/heronfief/cards-gen:main AS card-svg-stage
RUN python3 -u ./src/generate_cards_mvp.py
FROM git.legonzaur.fr/heronfief/tokens-gen:main AS token-svg-stage
RUN python3 -u ./src/generate_tokens_mvp.py
FROM install-stage AS build-stage
COPY --from=card-svg-stage /app/output/heron ./assets/images/cards/heron-svg
COPY --from=card-svg-stage /app/img/skins ./public/img
COPY --from=token-svg-stage /app/output/heron ./assets/images/tokens
COPY --from=token-svg-stage /app/img/icon ./public/img
ARG NUXT_PUBLIC_ENDPOINT
ARG NUXT_PUBLIC_DISCORD_LOGIN_ENDPOINT
ARG NUXT_PUBLIC_WELCOME_MESSAGE
RUN npx nuxi generate
# étape de production
FROM nginx:stable-alpine AS production-stage
COPY --from=build-stage /app/.output/public /usr/share/nginx/html
COPY --from=cards-svg-stage /app/img/skins /usr/share/nginx/html/img/skins
COPY --from=token-svg-stage /app/img/icon /usr/share/nginx/html/img/icon
COPY ./nginx.conf /etc/nginx/conf.d/default.conf