From 1bf7d97048b5a9351d71a268e3334556558a6355 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Wed, 17 Feb 2021 17:51:01 +0100 Subject: [PATCH] Working with Dockerfile --- .dockerignore | 1 + Dockerfile | 17 +++++++++++++++++ app/Controllers/Http/MeController.ts | 10 +++++----- app/tasks/FetchDevelopmentHours.ts | 0 app/tasks/FetchListeningMusic.ts | 3 +++ app/tasks/FetchSleepingState.ts | 0 ecosystem.config.js | 10 ---------- 7 files changed, 26 insertions(+), 15 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 app/tasks/FetchDevelopmentHours.ts create mode 100644 app/tasks/FetchListeningMusic.ts create mode 100644 app/tasks/FetchSleepingState.ts delete mode 100644 ecosystem.config.js diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f48de5f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:15.8.0-alpine3.10 + +RUN mkdir -p /usr/src/artapi +WORKDIR /usr/src/artapi + +COPY . /usr/src/artapi + +RUN yarn install --production + +RUN yarn build + +EXPOSE 5555 + +COPY . . + +WORKDIR /usr/src/artapi/build +CMD ["yarn", "start"] diff --git a/app/Controllers/Http/MeController.ts b/app/Controllers/Http/MeController.ts index 560e8fc..3b526ba 100644 --- a/app/Controllers/Http/MeController.ts +++ b/app/Controllers/Http/MeController.ts @@ -20,7 +20,7 @@ export default class MeController { "GoLang", "Java" ], - askMeAbout: [ + ask_me_about: [ "Web dev", "Tech", "Consulting", @@ -29,10 +29,10 @@ export default class MeController { "Software dev" ], technologies: { - webApp: ["VueJs", "NuxtJs", "Sass", "Tailwind"], - desktopApp: ["ElectronJs"], - mobileApp: ["React Native"], - backEnd: { + web_app: ["VueJs", "NuxtJs", "Sass", "Tailwind"], + desktop_app: ["ElectronJs"], + mobile_app: ["React Native"], + back_end: { typescript: ["AdonisJs"], java: ["Spring"] }, diff --git a/app/tasks/FetchDevelopmentHours.ts b/app/tasks/FetchDevelopmentHours.ts new file mode 100644 index 0000000..e69de29 diff --git a/app/tasks/FetchListeningMusic.ts b/app/tasks/FetchListeningMusic.ts new file mode 100644 index 0000000..217d454 --- /dev/null +++ b/app/tasks/FetchListeningMusic.ts @@ -0,0 +1,3 @@ +export async function isListeningMusic(): Promise { + +} diff --git a/app/tasks/FetchSleepingState.ts b/app/tasks/FetchSleepingState.ts new file mode 100644 index 0000000..e69de29 diff --git a/ecosystem.config.js b/ecosystem.config.js deleted file mode 100644 index 0aeb962..0000000 --- a/ecosystem.config.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - apps: [ - { - name: 'artapi', - exec_mode: 'cluster', - instances: 'max', // Or a number of instances - script: './build/server.js', - } - ] -}