From cb4e0b871f19a368dbd92f3048c941b6d7c37b6e Mon Sep 17 00:00:00 2001 From: Chiara Date: Mon, 18 Jan 2021 19:39:49 +0100 Subject: [PATCH] :sparkles: : add dockerfile & netlify files --- Dockerfile | 12 ++++++++++++ docker-compose.yml | 7 +++++++ netlify.toml | 21 +++++++++++++++++++++ src/common/config.js | 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 netlify.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..acbb4b1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM node:14.15.4-slim + +WORKDIR /app + +COPY . . +RUN yarn add node-sass +RUN yarn install + +EXPOSE 8080/tcp +EXPOSE 8080/udp + +CMD ["yarn", "serve"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7107007 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: '2' +services: + networks: + +networks: + web: + external: true diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..e7373dc --- /dev/null +++ b/netlify.toml @@ -0,0 +1,21 @@ +# example netlify.toml +[build] + command = "yarn run build" + functions = "functions" + publish = "." + + ## Uncomment to use this redirect for Single Page Applications like create-react-app. + ## Not needed for static site generators. + #[[redirects]] + # from = "/*" + # to = "/index.html" + # status = 200 + + ## (optional) Settings for Netlify Dev + ## https://github.com/netlify/cli/blob/master/docs/netlify-dev.md#project-detection + #[dev] + # command = "yarn start" # Command to start your dev server + # port = 3000 # Port that the dev server will be listening on + # publish = "dist" # Folder with the static content for _redirect file + + ## more info on configuring this file: https://www.netlify.com/docs/netlify-toml-reference/ diff --git a/src/common/config.js b/src/common/config.js index bc3dc53..7808a45 100644 --- a/src/common/config.js +++ b/src/common/config.js @@ -1,5 +1,5 @@ export const API_URL = process.env.NODE_ENV === "production" - ? "https://tobedefined.io/api" + ? "https://tpdevops.herokuapp.com/api" : "http://localhost:2020/api"; export default API_URL;