Skip to content

Commit

Permalink
run prepare script before building front to get dsfr assets
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeBu committed Mar 21, 2024
1 parent 449f387 commit 6191137
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ COPY api/ api/
COPY web/src/ web/src/
COPY web/config-overrides.js web/tsconfig.json web/

RUN sed -i '/"homepage":/d' web/package.json
WORKDIR /app/web
RUN yarn prepare
RUN sed -i '/"homepage":/d' package.json

WORKDIR /app
RUN yarn build

WORKDIR /app/api
Expand Down
23 changes: 23 additions & 0 deletions docker-compose.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: "3.8"
services:
api:
platform: linux/amd64
image: codegouvfr/api
env_file: .env
restart: unless-stopped

web:
platform: linux/amd64
image: codegouvfr/web
restart: unless-stopped

nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx/etc/nginx/conf.d/:/etc/nginx/conf.d/
depends_on:
- api
- web
restart: unless-stopped
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
nginx:
image: nginx:alpine
ports:
- "4000:80" # Map port 80 on the host to port 80 in the NGINX container
- "80:80" # Map port 80 on the host to port 80 in the NGINX container
volumes:
- ./nginx/etc/nginx/conf.d/:/etc/nginx/conf.d/
depends_on:
Expand Down

0 comments on commit 6191137

Please sign in to comment.