Cleanup backend dockerfile

This commit is contained in:
Mike Conrad
2025-06-19 21:14:49 -04:00
parent 761ea8fef8
commit 7aa80d9800
3 changed files with 8 additions and 7 deletions

View File

@ -1,5 +1,8 @@
FROM node:lts-alpine3.22 AS base
HEALTHCHECK --interval=5s --timeout=10s --start-period=5s --retries=5 \
HEALTHCHECK --interval=5s \
--timeout=10s \
--start-period=5s \
--retries=5 \
CMD sh -c 'wget --no-verbose --tries=1 --spider http://127.0.0.1:3333 || exit 1'
# All deps stage
@ -9,11 +12,10 @@ ADD package.json package-lock.json ./
RUN npm ci
FROM deps AS develop
WORKDIR /app
COPY dev-entrypoint.sh /entrypoint.sh
COPY .env.example /app/.env
RUN chmod +x /entrypoint.sh
ENV NODE_ENV=development
WORKDIR /app
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 3333
ENTRYPOINT [ "/entrypoint.sh" ]

View File

@ -3,7 +3,6 @@
echo "starting up..."
node ace generate:key
# Check for pending migrations by parsing output
PENDING_MIGRATIONS=$(node ace migration:status | grep -ic 'pending')

View File

@ -12,6 +12,6 @@ import UsersController from '#controllers/users_controller'
router.get('users', [UsersController, 'index'])
router.get('/', async () => {
return {
hello: 'world',
hello: 'hello',
}
})