From 2e22c75ab7a395ae7de0a7cf581d5332c7e4fd42 Mon Sep 17 00:00:00 2001 From: Sergo Date: Sat, 29 Jul 2023 22:12:35 +0300 Subject: [PATCH] add drone config --- .drone.yml | 35 +++++++++++++++++++++++++++++++++++ config/prod.js | 3 ++- readme.md | 46 +++++++++++----------------------------------- 3 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..7692e7a --- /dev/null +++ b/.drone.yml @@ -0,0 +1,35 @@ +kind: pipeline +type: kubernetes +name: build +steps: + - name: docker + image: harbor.k-space.ee/k-space/drone-kaniko + settings: + repo: ${DRONE_REPO} + tags: ${DRONE_BRANCH} + registry: harbor.codemowers.eu + username: + from_secret: docker_username + password: + from_secret: docker_password + + - name: test + image: harbor.codemowers.eu/msergo/walias:${DRONE_COMMIT_SHA} + settings: + registry: harbor.codemowers.eu + username: + from_secret: docker_username + password: + from_secret: docker_password + commands: + - npm test + +# services: +# - name: mysql +# image: mysql:8 +# environment: +# MYSQL_ROOT_PASSWORD: dev +# MYSQL_DATABASE: sky + +image_pull_secrets: + - dockerconfigjson diff --git a/config/prod.js b/config/prod.js index 58ec894..2d79fca 100644 --- a/config/prod.js +++ b/config/prod.js @@ -8,6 +8,7 @@ module.exports = { }, wildDuck: { url: process.env.WILDDUCK_URL, - token: process.env.WILDDUCK_TOKEN + token: process.env.WILDDUCK_TOKEN, + domain: process.env.WILDDUCK_DOMAIN } }; \ No newline at end of file diff --git a/readme.md b/readme.md index c12dc76..d9b8b3a 100644 --- a/readme.md +++ b/readme.md @@ -1,42 +1,18 @@ # walias -> Aliases for Wild Duck +> Manage email aliases for Wild Duck mail server ## About -This project uses [Feathers](http://feathersjs.com). An open source framework for building APIs and real-time applications. +This project was build for [K-Space Hackathon2023](https://wiki.k-space.ee/en/hackathon/2023) -## Getting Started +## Features + * auth with oidc + * headless only, no DB + * develop/debug with skaffold on k8s cluster -1. Make sure you have [NodeJS](https://nodejs.org/) and [npm](https://www.npmjs.com/) installed. -2. Install your dependencies - - ``` - cd path/to/walias - npm install - ``` - -3. Start your app - - ``` - npm run compile # Compile TypeScript source - npm run migrate # Run migrations to set up the database - npm start - ``` - -## Testing - -Run `npm test` and all your tests in the `test/` directory will be run. - -## Scaffolding - -This app comes with a powerful command line interface for Feathers. Here are a few things it can do: - -``` -$ npx feathers help # Show all commands -$ npx feathers generate service # Generate a new Service -``` - -## Help - -For more information on all the things you can do with Feathers visit [docs.feathersjs.com](http://docs.feathersjs.com). +## TODO + * remove TS-related hacks + * add tests + * make nicer UI + * implement persistent sessions for multi-docker deployment (redis, db, etc) \ No newline at end of file