From 1bc2effd2d226efe1bd992adc4bc421912e3486a Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 25 Jan 2024 14:07:29 +0300 Subject: [PATCH] dockerfile --- Dockerfile | 10 ++++++++++ docker-compose.yml | 16 ++++++++++++++++ static/scripts/documents-table.js | 21 +++++++++++++++++++++ static/styles/main.css | 14 +++++++++++++- static/templates/index.html | 4 ++-- 5 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd1999e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node + +WORKDIR /app + +COPY package*.json ./ +RUN npm install --production + +COPY . . + +CMD ["node", "index.js"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..40b59fb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: "3" +services: + captain-app: + build: + context: . + dockerfile: Dockerfile + working_dir: /app + command: ["node", "index.js"] + ports: + - "8081:8081" + volumes: + - .:/app + environment: + NODE_ENV: production + API_SERVER: "${API_SERVER}" + SITE_DOMAIN: "${SITE_DOMAIN}" diff --git a/static/scripts/documents-table.js b/static/scripts/documents-table.js index 88380d4..7bc29c6 100644 --- a/static/scripts/documents-table.js +++ b/static/scripts/documents-table.js @@ -73,6 +73,27 @@ $(document).ready(function () { rowContent.appendChild(date); rowContainer.appendChild(rowContent); + + // const deleteIcon = document.createElement("div"); + // deleteIcon.setAttribute("class", "row-delete-icon"); + + // let deleteContent = ` + // + // + // + // + // + // + // + // + // + // + // `; + + // deleteIcon.innerHTML = deleteContent; + + // rowContainer.appendChild(deleteIcon); + data.appendChild(rowContainer); row.appendChild(data); tbody.appendChild(row); diff --git a/static/styles/main.css b/static/styles/main.css index 070ccf9..29a3cb7 100644 --- a/static/styles/main.css +++ b/static/styles/main.css @@ -1479,13 +1479,25 @@ input::placeholder { } .project-content .row-icon, -.progress-content .row-icon { +.progress-content .row-icon, +.progress-content .row-delete-icon { padding: 13px 0px; width: 30px; height: 30px; text-align: center; } +.row-delete-icon { + z-index: 3; + border-radius: 5px; + transition: 0.3s; + padding: 5px 0 !important; + margin: auto 0; +} + +.row-delete-icon:hover { + background-color: rgba(0, 0, 0, 0.1); +} .project-content .row-content, .progress-content .row-content { width: 100%; diff --git a/static/templates/index.html b/static/templates/index.html index fb99ec3..a5060c3 100644 --- a/static/templates/index.html +++ b/static/templates/index.html @@ -12,7 +12,7 @@ - +