This commit is contained in:
Shahrad Elahi 2023-10-31 18:33:19 +03:30
parent beae28270e
commit 6bd9a63ad7
6 changed files with 7 additions and 6 deletions

View File

@ -47,8 +47,8 @@ RUN npm install --omit dev
EXPOSE 3000/tcp EXPOSE 3000/tcp
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ HEALTHCHECK --interval=60s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://127.0.0.1:3000/api/wireguard/healthcheck || exit 1 CMD curl -f http://127.0.0.1:3000/api/healthcheck || exit 1
COPY docker-entrypoint.sh /usr/bin/entrypoint COPY docker-entrypoint.sh /usr/bin/entrypoint
RUN chmod +x /usr/bin/entrypoint RUN chmod +x /usr/bin/entrypoint

View File

@ -29,7 +29,7 @@ COPY /config/torrc /etc/tor/torrc
EXPOSE 3000/tcp EXPOSE 3000/tcp
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://127.0.0.1:3000/api/wireguard/healthcheck || exit 1 CMD curl -f http://127.0.0.1:3000/api/healthcheck || exit 1
COPY docker-entrypoint.sh /usr/bin/entrypoint COPY docker-entrypoint.sh /usr/bin/entrypoint
RUN chmod +x /usr/bin/entrypoint RUN chmod +x /usr/bin/entrypoint

View File

@ -91,6 +91,6 @@ echo -e "========================================================\n"
sleep 1 sleep 1
# After 10 seconds, export the database to the WireGuard config file # After 10 seconds, export the database to the WireGuard config file
screen -dm bash -c "sleep 10; curl -s -o /dev/null http://127.0.0.1:3000/api/wireguard/healthcheck" screen -dm bash -c "sleep 10; curl -s -o /dev/null http://127.0.0.1:3000/api/healthcheck"
exec "$@" exec "$@"

View File

@ -10,8 +10,9 @@ export default withAuth({
}) })
// See "Matching Paths" below to learn more // See "Matching Paths" below to learn more
// https://nextjs.org/docs/app/building-your-application/routing/middleware#matching-paths
export const config = { export const config = {
matcher: [ matcher: [
'/((?!api/auth|api/wireguard/healthcheck|api/ping|login|logo.png|fonts|_next/static|_next/image|favicon.ico).*)', '/((?!api/auth|api/healthcheck|_next/static|_next/image|login|logo.png|fonts|favicon.ico).*)',
], ],
} }

View File

@ -9,7 +9,7 @@ function publicENV(ex = {}) {
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
transpilePackages: [], transpilePackages: [],
env: publicENV({ NEXTAUTH_URL: 'http://127.0.0.1:3000' }), env: publicENV({}),
images: { images: {
domains: [ 'img.shields.io' ] domains: [ 'img.shields.io' ]
} }