Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: share 'pb_migrations' directory from Grimoire Docker image; add health check to Grimoire API #66

Merged
merged 8 commits into from
Apr 30, 2024
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ build
package
**/.env
pb_data
pb_migrations
coverage
pb_migrations
CONTRIBUTING.md
run-dev.sh
build.sh
build.sh
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ENV BODY_SIZE_LIMIT=$BODY_SIZE_LIMIT
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/build /app/build
COPY --from=build /app/package.json /app/package.json
COPY --from=base /app/pb_migrations /app/pb_migrations
ENV NODE_ENV=production
EXPOSE $PORT
CMD [ "node", "-r", "dotenv/config", "src/server.js" ]
20 changes: 15 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,39 @@
version: '3.7'
services:
pocketbase:
image: spectado/pocketbase:0.19.2
image: spectado/pocketbase:0.22.10
container_name: grimoire-pocketbase
restart: unless-stopped
ports:
- '8090:80'
volumes:
- ./pb_data:/pb_data
- ./pb_migrations:/pb_migrations/
- pb_data:/pb_data
- pb_migrations:/pb_migrations/
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:80/api/health || exit 1
interval: 5s
timeout: 5s
retries: 5
env_file: .env
depends_on:
- grimoire
grimoire:
image: goniszewski/grimoire:latest
container_name: grimoire
restart: unless-stopped
env_file: .env
volumes:
- pb_migrations:/app/pb_migrations/
build:
context: .
dockerfile: Dockerfile
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost:$PORT/api/health || exit 1
interval: 5s
timeout: 5s
retries: 5
ports:
- '$PORT:$PORT'
depends_on:
- pocketbase
volumes:
pb_data:
pb_migrations:
Loading