Skip to content

Commit

Permalink
feat: l'application est packagee avec la bdd
Browse files Browse the repository at this point in the history
  • Loading branch information
bachrc committed Oct 17, 2024
1 parent 1718d5f commit de823e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 65 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/deploy-database.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Déploiement du site
name: Déploiement de l'application

on:
push:
Expand All @@ -7,7 +7,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: 'bachrc/de-l-arbre-aux-wc-app'
IMAGE_NAME: 'bachrc/de-l-arbre-aux-wc'

permissions:
contents: read
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ RUN deno task build
FROM base AS database
WORKDIR /app
COPY ./pb_migrations /home/deno/.local/pb/pb_migrations
CMD ["/home/deno/.local/pb/pocketbase", "serve", "--http=0.0.0.0:8080"]
ENTRYPOINT ["/home/deno/.local/pb/pocketbase", "serve"]
CMD ["--http=0.0.0.0:8080"]

FROM nginx:1-alpine AS app
COPY --from=build /app/build /usr/share/nginx/html
FROM database AS app
RUN mkdir -p /home/deno/.local/pb/pb_public
COPY --from=build /app/build /home/deno/.local/pb/pb_public
ENTRYPOINT ["/home/deno/.local/pb/pocketbase", "serve"]
CMD ["--http=0.0.0.0:8080"]
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
ports:
- 80:80
environment:
PUBLIC_POCKETBASE_URL: db:8080
PUBLIC_POCKETBASE_URL: 127.0.0.1:8080

db:
image: ghcr.io/bachrc/de-l-arbre-aux-wc-database:latest
Expand Down

0 comments on commit de823e8

Please sign in to comment.