Compare commits

..

No commits in common. "b14fa05adc1ef8e34fd73bf5f495505df7d44b33" and "512acc0b8c15d4cfbafef21ec20707bac4629ea4" have entirely different histories.

5 changed files with 9 additions and 16 deletions

View File

@ -2,19 +2,8 @@
All notable changes to this project will be documented in this file. Dates are displayed in UTC. All notable changes to this project will be documented in this file. Dates are displayed in UTC.
#### [0.1.2](https://git.odit.services/kauft.es/linkylinky/compare/0.1.1...0.1.2)
- API Endpoint to get all short urls [`fa01864`](https://git.odit.services/kauft.es/linkylinky/commit/fa01864d0de7921e741d63c3f5795161279ea478)
- Changed the way that the migration get's triggered [`8fa489f`](https://git.odit.services/kauft.es/linkylinky/commit/8fa489f2bcd9d1ad63ab4581b7f3b27eee3d9038)
- Get all api endpoints [`91b25c2`](https://git.odit.services/kauft.es/linkylinky/commit/91b25c22ca035aec5cc2fdc80ca4fbb56a2f8b65)
- Added optional db volume to docker-compose [`7c71e94`](https://git.odit.services/kauft.es/linkylinky/commit/7c71e943041d8e3ac9dcf95cad27f2f0bc0b024c)
- Prod db now resides in db folder [`512acc0`](https://git.odit.services/kauft.es/linkylinky/commit/512acc0b8c15d4cfbafef21ec20707bac4629ea4)
#### [0.1.1](https://git.odit.services/kauft.es/linkylinky/compare/0.1.0...0.1.1) #### [0.1.1](https://git.odit.services/kauft.es/linkylinky/compare/0.1.0...0.1.1)
> 14 August 2021
- 🚀RELEASE 0.1.1 [`55d6b91`](https://git.odit.services/kauft.es/linkylinky/commit/55d6b91cc252ee6676d13df9abd8b61283a07f0f)
- fix: Dockerfile [`807eb9c`](https://git.odit.services/kauft.es/linkylinky/commit/807eb9c267377df0b5f30f81eb380ef8a1c2add2) - fix: Dockerfile [`807eb9c`](https://git.odit.services/kauft.es/linkylinky/commit/807eb9c267377df0b5f30f81eb380ef8a1c2add2)
#### [0.1.0](https://git.odit.services/kauft.es/linkylinky/compare/0.0.2...0.1.0) #### [0.1.0](https://git.odit.services/kauft.es/linkylinky/compare/0.0.2...0.1.0)

View File

@ -6,7 +6,6 @@ RUN yarn --production --frozen-lockfile
COPY migrations ./migrations COPY migrations ./migrations
COPY src/server.js ./ COPY src/server.js ./
COPY knexfile.js ./ COPY knexfile.js ./
RUN mkdir db
# #
# FROM astefanutti/scratch-node:16.0.0 # FROM astefanutti/scratch-node:16.0.0
FROM node:16.6.2-alpine3.14 FROM node:16.6.2-alpine3.14
@ -14,4 +13,4 @@ WORKDIR /app
COPY --from=0 /app /app COPY --from=0 /app /app
ENV NODE_ENV production ENV NODE_ENV production
EXPOSE 3000 EXPOSE 3000
ENTRYPOINT ["/bin/sh", "-c", "yarn migrate && node ./server.js"] ENTRYPOINT ["node", "./server.js"]

View File

@ -5,5 +5,3 @@ services:
#image: registry.odit.services/kauft.es/linkylinky:latest #image: registry.odit.services/kauft.es/linkylinky:latest
ports: ports:
- 3000:3000 - 3000:3000
#volumes:
# - ./db:/app/db

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/shortener-backend", "name": "@odit/shortener-backend",
"version": "0.1.2", "version": "0.1.1",
"main": "index.js", "main": "index.js",
"license": "MIT", "license": "MIT",
"private": false, "private": false,

View File

@ -315,6 +315,13 @@ async function validate(username, password, req, reply) {
// Run the server! // Run the server!
const start = async () => { const start = async () => {
try {
await knex.migrate.latest()
} catch (err) {
fastify.log.error(err)
process.exit(1)
}
try { try {
await fastify.listen(3000, '0.0.0.0') await fastify.listen(3000, '0.0.0.0')
} catch (err) { } catch (err) {