Compare commits

..
9 Commits
Author SHA1 Message Date
Maksim Eltyshev 73a641b935 chore: Update version 2024-03-12 20:44:27 +01:00
Maksim Eltyshev 6802a0dc69 fix: Fix case sensitivity of default admin environment variables 2024-03-12 20:40:46 +01:00
Daniel Hiller 81d6c43cd9 fix: Container build windows 2024-02-14 03:15:34 +01:00
Maksim Eltyshev ca6a1a14f5 fix: Fix nullable boolean inputs 2024-02-08 16:42:10 +01:00
Daniel Hiller c096444acb Update build-and-push-docker-image-dev.yml 2024-02-08 15:34:43 +01:00
Maksim Eltyshev 51d05f3cd3 fix: Include due date when importing from Trello
Closes #598
2024-02-08 13:30:07 +01:00
Daniel Hiller 221da3c455 ci: update workflow 2024-02-06 02:07:27 +01:00
Daniel Hiller 92098e136c feat: Add healthcheck for docker deployments
fix: Missing healthcheck.js

fix: missing healthcheck.js

fix: HEALTHCHECK command
2024-02-06 01:51:00 +01:00
Maksim Eltyshev fd5c33dd5d fix: Remove overflow of attachment dropzone 2024-02-05 13:24:50 +01:00
16 changed files with 71 additions and 43 deletions
+8 -3
View File
@@ -6,7 +6,7 @@ RUN apk -U upgrade \
WORKDIR /app
COPY server/package.json server/package-lock.json .
COPY server/package.json server/package-lock.json ./
RUN npm install npm@latest --global \
&& npm install pnpm --global \
@@ -17,7 +17,7 @@ FROM node:lts AS client
WORKDIR /app
COPY client/package.json client/package-lock.json .
COPY client/package.json client/package-lock.json ./
RUN npm install npm@latest --global \
&& npm install pnpm --global \
@@ -38,6 +38,7 @@ WORKDIR /app
COPY --chown=node:node start.sh .
COPY --chown=node:node server .
COPY --chown=node:node healthcheck.js .
RUN mv .env.sample .env
@@ -52,4 +53,8 @@ VOLUME /app/private/attachments
EXPOSE 1337
CMD ["./start.sh"]
HEALTHCHECK --interval=10s --timeout=2s --start-period=15s \
CMD node ./healthcheck.js
CMD [ "bash", "start.sh" ]
+2 -2
View File
@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.17
version: 0.1.18
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.15.6"
appVersion: "1.15.7"
dependencies:
- alias: postgresql
+1 -1
View File
@@ -1 +1 @@
REACT_APP_VERSION=1.15.6
REACT_APP_VERSION=1.15.7
@@ -94,7 +94,7 @@ const AttachmentAddZone = React.memo(({ children, onCreate }) => {
return (
<>
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
<div {...getRootProps()} className={styles.wrapper}>
<div {...getRootProps()}>
{isDragActive && <div className={styles.dropzone}>{t('common.dropFileToUpload')}</div>}
{children}
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
@@ -12,8 +12,4 @@
width: 100%;
z-index: 2001;
}
.wrapper {
overflow: hidden;
}
}
+14 -11
View File
@@ -3,15 +3,7 @@ version: '3'
services:
planka:
image: ghcr.io/plankanban/planka:master
command: >
bash -c
"for i in `seq 1 30`; do
./start.sh &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 seconds...\";
sleep 5;
done; (exit $$s)"
restart: unless-stopped
restart: on-failure
volumes:
- user-avatars:/app/public/user-avatars
- project-background-images:/app/public/project-background-images
@@ -44,19 +36,30 @@ services:
# - OIDC_CLIENT_SECRET=
# - OIDC_SCOPES=openid email profile
# - OIDC_ADMIN_ROLES=admin
# - OIDC_EMAIL_ATTRIBUTE=email
# - OIDC_NAME_ATTRIBUTE=name
# - OIDC_USERNAME_ATTRIBUTE=preferred_username
# - OIDC_ROLES_ATTRIBUTE=groups
# - OIDC_IGNORE_USERNAME=true
# - OIDC_IGNORE_ROLES=true
# - OIDC_ENFORCED=true
depends_on:
- postgres
postgres:
condition: service_healthy
postgres:
image: postgres:14-alpine
restart: unless-stopped
restart: on-failure
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=planka
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
interval: 10s
timeout: 5s
retries: 5
volumes:
user-avatars:
+9 -11
View File
@@ -3,15 +3,7 @@ version: '3'
services:
planka:
image: ghcr.io/plankanban/planka:latest
command: >
bash -c
"for i in `seq 1 30`; do
./start.sh &&
s=$$? && break || s=$$?;
echo \"Tried $$i times. Waiting 5 seconds...\";
sleep 5;
done; (exit $$s)"
restart: unless-stopped
restart: on-failure
volumes:
- user-avatars:/app/public/user-avatars
- project-background-images:/app/public/project-background-images
@@ -52,16 +44,22 @@ services:
# - OIDC_IGNORE_ROLES=true
# - OIDC_ENFORCED=true
depends_on:
- postgres
postgres:
condition: service_healthy
postgres:
image: postgres:14-alpine
restart: unless-stopped
restart: on-failure
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=planka
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
interval: 10s
timeout: 5s
retries: 5
volumes:
user-avatars:
+23
View File
@@ -0,0 +1,23 @@
const http = require('http');
const options = {
host: 'localhost',
port: 1337,
timeout: 2000
};
const healthCheck = http.request(options, (res) => {
console.log(`HEALTHCHECK STATUS: ${res.statusCode}`);
if (res.statusCode == 200) {
process.exit(0);
}
else {
process.exit(1);
}
});
healthCheck.on('error', function (err) {
console.error('ERROR');
process.exit(1);
});
healthCheck.end();
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "planka",
"version": "1.15.6",
"version": "1.15.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "planka",
"version": "1.15.6",
"version": "1.15.7",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "planka",
"version": "1.15.6",
"version": "1.15.7",
"private": true,
"homepage": "https://plankanban.github.io/planka",
"repository": {
@@ -29,6 +29,7 @@ module.exports = {
},
canComment: {
type: 'boolean',
allowNull: true,
},
},
@@ -17,6 +17,7 @@ module.exports = {
},
canComment: {
type: 'boolean',
allowNull: true,
},
},
@@ -107,6 +107,7 @@ module.exports = {
position: trelloCard.pos,
name: trelloCard.name,
description: trelloCard.desc || null,
dueDate: trelloCard.due,
}).fetch();
await importCardLabels(plankaCard, trelloCard);
+2 -1
View File
@@ -31,7 +31,8 @@ module.exports.custom = {
attachmentsPath: path.join(sails.config.appPath, 'private', 'attachments'),
attachmentsUrl: `${process.env.BASE_URL}/attachments`,
defaultAdminEmail: process.env.DEFAULT_ADMIN_EMAIL,
defaultAdminEmail:
process.env.DEFAULT_ADMIN_EMAIL && process.env.DEFAULT_ADMIN_EMAIL.toLowerCase(),
oidcIssuer: process.env.OIDC_ISSUER,
oidcClientId: process.env.OIDC_CLIENT_ID,
+4 -3
View File
@@ -13,7 +13,7 @@ const buildData = () => {
data.name = process.env.DEFAULT_ADMIN_NAME;
}
if (process.env.DEFAULT_ADMIN_USERNAME) {
data.username = process.env.DEFAULT_ADMIN_USERNAME;
data.username = process.env.DEFAULT_ADMIN_USERNAME.toLowerCase();
}
return data;
@@ -24,16 +24,17 @@ exports.seed = async (knex) => {
return;
}
const email = process.env.DEFAULT_ADMIN_EMAIL.toLowerCase();
const data = buildData();
try {
await knex('user_account').insert({
...data,
email: process.env.DEFAULT_ADMIN_EMAIL,
email,
subscribeToOwnCards: false,
createdAt: new Date().toISOString(),
});
} catch (error) {
await knex('user_account').update(data).where('email', process.env.DEFAULT_ADMIN_EMAIL);
await knex('user_account').update(data).where('email', email);
}
};
+1 -3
View File
@@ -1,4 +1,2 @@
#!/bin/bash
set -e
node db/init.js
exec node app.js --prod $@
export NODE_ENV=production && set -e && node db/init.js && node app.js --prod