Skip to content

Commit

Permalink
chore: add Dockerfile test
Browse files Browse the repository at this point in the history
  • Loading branch information
solufa committed Jun 7, 2024
1 parent c385f91 commit cffab21
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,9 @@ jobs:
- run: cp server/.env.example server/.env
- run: docker compose up -d
- run: npm test

- run: docker build . -t magnito --build-arg VERSION=0.0.0
- run: docker images
- run: docker run -d --name test magnito
- run: docker ps
- run: docker stop test
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN npm run batch:writeVersion -- $VERSION
RUN npm run build
RUN apk --no-cache add curl

HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD curl -f $API_ORIGIN/health || exit 1
HEALTHCHECK --interval=5s --timeout=5s --retries=3 CMD curl -f $API_ORIGIN/health && curl -f $CORS_ORIGIN || exit 1

EXPOSE 5000 5001
VOLUME ["/usr/src/app/data"]
Expand Down
6 changes: 3 additions & 3 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ services:
inbucket:
image: inbucket/inbucket:3.0.3
ports:
- '2500:2500' # SMTP
- '9000:9000' # web interface
- '1100:1100' # POP3
- 2500:2500 # SMTP
- 9000:9000 # web interface
- 1100:1100 # POP3
volumes:
- inbucket:/storage

Expand Down

0 comments on commit cffab21

Please sign in to comment.