Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
fix: dockefile
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgfr committed Feb 19, 2022
1 parent 53cd187 commit 8bc5351
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ ARG PRODUCTION
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN yarn build && \
if [ -z "$PRODUCTION" ]; then \
echo "Copy staging values"; \
RUN if [ -z "$PRODUCTION" ]; then \
echo "Overriding .env for staging"; \
cp .env.staging .env.production; \
cp ./public/robots.staging.txt ./public/robots.txt; \
fi \
&& yarn export
fi && \
yarn build:export \
&& if [ -z "$PRODUCTION" ]; then \
echo "Overriding robots.txt for staging"; \
mv ./out/robots.staging.txt ./out/robots.txt; \
fi

# Production image, copy all the files and run next
FROM ghcr.io/socialgouv/docker/nginx:6.64.2 AS runner
Expand Down
2 changes: 1 addition & 1 deletion public/sitemap-0.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<url><loc>https://template.fabrique.social.gouv.fr</loc><changefreq>daily</changefreq><priority>0.7</priority><lastmod>2022-02-18T21:49:06.024Z</lastmod></url>
<url><loc>https://template.fabrique.social.gouv.fr</loc><changefreq>daily</changefreq><priority>0.7</priority><lastmod>2022-02-19T09:12:14.128Z</lastmod></url>
</urlset>

0 comments on commit 8bc5351

Please sign in to comment.