Skip to content

Commit

Permalink
🐛 Fix docker healthcheck (#2842)
Browse files Browse the repository at this point in the history
  • Loading branch information
moisout authored Jun 15, 2024
1 parent bb58f03 commit 47c1cc3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [0.16.2]

### Added

- Add "load more" on search page [#2838](https://github.com/ViewTube/viewtube/pull/2838)

### Fixed

- Bind API to :: by default [#2832](https://github.com/ViewTube/viewtube/pull/2832)
- Fix docker healthcheck [#2842](https://github.com/ViewTube/viewtube/pull/2842)

## [0.16.1]

### Added
Expand Down Expand Up @@ -446,7 +457,8 @@

- Initial release

[unreleased]: https://github.com/viewtube/viewtube/compare/v0.16.1...development
[unreleased]: https://github.com/viewtube/viewtube/compare/v0.16.2...development
[0.16.2]: https://github.com/viewtube/viewtube/compare/v0.16.1...v0.16.2
[0.16.1]: https://github.com/viewtube/viewtube/compare/v0.16.0...v0.16.1
[0.16.0]: https://github.com/viewtube/viewtube/compare/v0.15.4...v0.16.0
[0.15.4]: https://github.com/viewtube/viewtube/compare/v0.15.3...v0.15.4
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ COPY --from=build /home/build/client/.output ./client/.output/
RUN \
--mount=type=cache,target=/var/cache/apt \
apt-get update \
&& apt-get install -y --no-install-recommends wget \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

ENV VIEWTUBE_BASE_DIR=/home/app
HEALTHCHECK --interval=30s --timeout=20s --start-period=60s CMD wget --no-verbose --tries=3 --spider http://localhost:8066/ || exit 1
HEALTHCHECK --interval=30s --timeout=20s --start-period=60s --retries=5 CMD curl --fail http://localhost:8066/ || exit 1
EXPOSE 8066

CMD ["node", "/home/app/server/dist/main.js"]
10 changes: 2 additions & 8 deletions server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,8 @@ const bootstrap = async () => {
contentSecurityPolicy: {
useDefaults: true,
directives: {
defaultSrc: [`'self'`, `blob:`, `data:`],
scriptSrc: [
`'self'`,
`blob:`,
`https: 'unsafe-eval'`,
`https: 'unsafe-inline'`,
'*.viewtube.io'
],
defaultSrc: [`'self'`, `blob:`, `data:`, '*.viewtube.io'],
scriptSrc: [`'self'`, `blob:`, `https: 'unsafe-eval'`, `https: 'unsafe-inline'`],
scriptSrcAttr: null
}
}
Expand Down

0 comments on commit 47c1cc3

Please sign in to comment.