as-services/services/web/Dockerfile
devthejo 16b7e7d6aa
All checks were successful
/ build (map[dockerfile:./services/hasura/Dockerfile name:hasura]) (push) Successful in 47s
/ build (map[dockerfile:./services/web/Dockerfile name:web]) (push) Successful in 1m47s
/ build (map[dockerfile:./services/watchers/Dockerfile name:watchers]) (push) Successful in 2m37s
/ build (map[dockerfile:./services/files/Dockerfile name:files]) (push) Successful in 2m52s
/ build (map[dockerfile:./services/api/Dockerfile name:api]) (push) Successful in 3m2s
/ build (map[dockerfile:./services/app/Dockerfile name:app]) (push) Successful in 31s
/ build (map[dockerfile:./services/tasks/Dockerfile name:tasks]) (push) Successful in 2m44s
/ deploy (push) Successful in 48s
chore(init): available sources
2025-04-13 10:46:53 +02:00

28 lines
No EOL
818 B
Docker

# syntax = devthefuture/dockerfile-x
FROM ./dockerfile-x/node AS build
ENV NODE_ENV=production
# fetch
COPY --chown=1000:1000 .yarnrc.yml ./
COPY --chown=1000:1000 yarn.lock.prod ./yarn.lock
COPY --chown=1000:1000 .yarn .yarn
RUN yarn fetch workspaces focus @as/web
# copy
COPY --chown=1000:1000 services/web/package.json services/web/package.json
COPY --chown=1000:1000 services/web/src services/web/src
COPY --chown=1000:1000 services/web/public services/web/public
# build
RUN yarn workspaces foreach -A -t run postinstall
ENV NODE_OPTIONS=--openssl-legacy-provider
RUN yarn workspace @as/web build
# clean
RUN yarn workspaces focus --production @as/web && yarn cache clean --all
# server
FROM ./dockerfile-x/nginx
COPY --from=build /app/services/web/build /usr/share/nginx/html/
LABEL project="alertesecours"