diff --git a/.env b/.env deleted file mode 100644 index 1ba3018..0000000 --- a/.env +++ /dev/null @@ -1,12 +0,0 @@ -VERSION_NUMBER= -JTT_WEBAPP_HOST= -JIRA_URL= -OAUTH_CONSUMER_KEY= -OAUTH_ACCESS_TOKEN= -OAUTH_PRIVATE_KEY= -OAUTH_SECRET= -DH_PEM= -FULL_CHAIN_PEM= -PRIVATE_KEY_PEM= -DOCKER_USERNAME= -DOCKER_PASSWORD= \ No newline at end of file diff --git a/Data Security and Privacy Statement.md b/Data Security and Privacy Statement.md deleted file mode 100644 index 28a56ed..0000000 --- a/Data Security and Privacy Statement.md +++ /dev/null @@ -1,18 +0,0 @@ -Effective starting: May 1, 2024. - -At Devexperts, we are committed to data security and privacy, recognizing the critical importance of protecting the information of our customers who use the **Devexperts Time Tracker for Jira** app on the Atlassian Marketplace. This Data Security and Privacy Statement affirms our dedication to ensuring that our customers’ data remains secure and private at all times. - -# Data Storage and Processing -Devexperts provides the **Devexperts Time Tracker for Jira** as a bundled solution that includes a Jira Data Center plugin, a standalone web application, and a backend service. Both the web and backend applications are installed within the customer’s infrastructure, ensuring that all data is stored and processed entirely within the customer’s secure environment. Devexperts has no access to this data, preserving full data privacy and control for the customer. - -# Data Access and Sharing -Devexperts has no access to customer data managed by **Devexperts Time Tracker for Jira**, ensuring complete data privacy and security within the customer’s infrastructure. - -# Data Security Measures -At Devexperts, we prioritize the security of our customers’ data. **Devexperts Time Tracker for Jira** — including the Jira plugin, web application, and backend service — is designed and built with a “security-first” approach, ensuring robust protection for all data stored and processed. We also adhere strictly to Atlassian’s security and privacy policies, maintaining full compliance to meet industry standards for data protection and privacy. - -# Customer Privacy -We respect our customers’ privacy and do not collect any personal data. All data managed within **Devexperts Time Tracker for Jira** remains solely within the customer’s infrastructure, ensuring complete control and privacy. - -# Updates to the Data Security and Privacy Statement -We may update this Data Security and Privacy Statement periodically. Any updates will be posted on the **Devexperts Time Tracker for Jira** GitHub page, taking effect immediately upon posting. diff --git a/Devexperts Time Tracker Manual.pdf b/Devexperts Time Tracker Manual.pdf deleted file mode 100644 index 63d824c..0000000 Binary files a/Devexperts Time Tracker Manual.pdf and /dev/null differ diff --git a/LICENSE b/LICENSE deleted file mode 100644 index a612ad9..0000000 --- a/LICENSE +++ /dev/null @@ -1,373 +0,0 @@ -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. diff --git a/README.md b/README.md deleted file mode 100644 index 400454d..0000000 --- a/README.md +++ /dev/null @@ -1,122 +0,0 @@ -# DEVEXPERTS TIME TRACKER FOR JIRA - -This package contains everything you need to set up, configure, and run the Devexperts Time Tracker For Jira App within Docker containers. It also includes detailed instructions for integrating the app with an existing Jira instance by creating an application link, installing and configuring the Jira plugin, and initializing the environment. - -Follow the steps below to properly set up and run the application. - -## Contents - -- `.env` - Environment variables file. // Provide your own values for the variables following the instructions in this file -- `docker-compose.yaml` - Docker Compose configuration file. -- `timetracker.sh` - Shell script for Linux/macOS/Windows systems. -- `proxy / ` - - `nginx.conf` - Nginx configuration file. - - `privkey.pem` - Private key file. // Provide your own key file and update the environment variable 'PRIVATE_KEY_PEM' with the file name - - `fullchain.pem` - Full chain certificate file. // Provide your own certificate file and update the environment variable 'FULL_CHAIN_PEM' with the file name -- `ui-nginx / ` - - `nginx.conf` - Nginx configuration file. - - `mime.types` - Nginx MIME types file. - - `conf.d / ` - - `default.conf` - Nginx default configuration file. -- `link-creation / ` - - `run.sh` - Shell script for creating an application link between Jira and the Time Tracker App. - - `run2.sh` - Shell script for finalizing the application link creation. - - `OAuthClient-1.0.jar` - OAuth client JAR file used by scripts. -- `custom_images /` - Folder containing images for web application. If you want to use your own images, replace the existing ones. -- `README.md` - Instructions for using the deployment package. -- `log4j.properties` - Log4j configuration file for Jira plugin. -- `LICENSE` - License file. -- `Devexperts Time Tracker Manual.pdf` - User manual for the Time Tracker App. - -## Prerequisites - -* Ensure you have Docker and Docker Compose installed on your system. -* Obtain the necessary Docker credentials to access private Docker images and set the `DOCKER_USERNAME` and `DOCKER_PASSWORD` environment variables in the `.env` file. -* Ensure that the server host where the application will run is whitelisted for network access. - -## Setup Instructions - -### Step 1: Install and Configure Devexperts Time Tracker for Jira Plugin - - Log in to your Jira instance as an administrator. - - Navigate to Jira Administration > Manage apps. - - Click on Find new apps or Find new add-ons and search for the "Devexperts Time Tracker for Jira" - - Install the plugin from the Atlassian Marketplace. - - Once installed, click on the Configure button for the plugin to set the required parameters: - - `Panel Title` - Set the title of the time tracking panel on Jira issues page // example: Devexperts Time Tracker - - `Host` - Set the host name of the server with Time Tracker application // example: [http://time-tracker.example.com]() - - `Port` - Set the port number of the host // example: 80 - - `Websocket Address` - Set the address of the websocket server (should be similar to `Host` and match the pattern: "wss://{..}/ws/sse/rtt") // example: wss://time-tracker.example.com/ws/sse/rtt - - `Custom Parameters (comma separated)` - Set the custom parameters for the plugin // Leave empty if not needed - -### Step 2: Create Application Link in Jira -The following steps are required to create an application link between the Jira instance and the Time Tracker App. This link is necessary for the Jira instance to communicate with the Time Tracker App and access its resources. -For more information, refer to the Atlassian documentation: https://developer.atlassian.com/server/jira/platform/oauth -1. Generate the OAuth keys: - - Follow the instructions on https://developer.atlassian.com/server/jira/platform/oauth/#generate-an-rsa-public-private-key-pair - - Save the private key and public key for later use. -2. Jira administrator steps: - - Login in Jira as administrator. - - Go to Jira Administration > Applications > Application Links. - - Click 'Create new link'. - - Enter the URL of the Jira Time Tracker App (as set in JTT_WEBAPP_HOST in the .env file). If Application type is also required to be set, select Atlassian product. - - Ignore the 'No response was received from the URL you entered' message and click 'Continue'. - - Enter the Application Name that identifies the Time Tracking App. Set the Application Type to Generic Application. Check the 'Create incoming link' checkbox. The other fields can be left empty. - - Enter the Consumer Key and set the same value in the .env file under OAUTH_CONSUMER_KEY. - - Enter the Public Key provided during the app setup. - - Click Continue to complete the application link configuration. -3. Running run.sh script: - - Open a terminal. Navigate to the link-creation directory. - - Run the `./run.sh OAUTH_CONSUMER_KEY JIRA_URL PRIVATE_KEY` command, where JIRA_URL is the URL of the Jira instance and PRIVATE_KEY is the private key provided during the app setup. // example: ./run.sh CONSUMER_KEY [http://jira.example.com]() MIIBCAQ8A...MIIBCgKCAQEAq3 - - After script finishes, it will output the URL to authorize the application link. // example: [http://jira.example.com/plugins/servlet/oauth/authorize?oauth_token=HJgjgjg]() -4. Jira administrator steps: - - Login in Jira as administrator. - - Open the URL provided by the script in a browser. - - Click 'Allow' to authorize the application link. - - After successful authorization, you will see a message containing the verification code. // example: You have successfully authorized 'your_application'. Your verification code is '123456' -5. Running run2.sh script: - - Open a terminal. Navigate to the link-creation directory. - - Run the `./run2.sh VERIFICATION_CODE` command, where VERIFICATION_CODE is the code provided during the authorization. // example: ./run2.sh 123456 - - After script finishes, it will output the access token. - -### Step 3: Configure the Environment Variables - -The `.env` file contains configuration settings needed for the application. Edit this file to include the required information before running the scripts. - -### Required Variables - -Edit the following variables in the `.env` file: - -```ini -VERSION_NUMBER= # Set the version number of the build -OAUTH_CONSUMER_KEY= # Set your OAuth consumer key -OAUTH_ACCESS_TOKEN= # Set your OAuth access token -OAUTH_PRIVATE_KEY= # Set your OAuth private key -OAUTH_SECRET= # Set your OAuth secret -JIRA_URL= # Set your Jira URL -JTT_WEBAPP_HOST= # Set the url of the current machine -FULL_CHAIN_PEM= # Set the name of the full chain certificate file in ./jtt-proxy -PRIVATE_KEY_PEM= # Set the name of the private key file in ./jtt-proxy -DOCKER_USERNAME= # Set your Docker username received in advance -DOCKER_PASSWORD= # Set your Docker password received in advance -``` - -### Step 4: Run `timetracker.sh` to Start the Services - -1. Open a terminal. -2. Navigate to the directory containing the deployment package. -3. Run the script with one of the following commands: - ```sh - ./timetracker.sh init # To initialize the setup - Run this once - ./timetracker.sh start # To start the services - ./timetracker.sh stop # To stop the services - ./timetracker.sh restart # To restart the web application service - ./timetracker.sh update # To update the web application service - ``` - -## Notes -- By default, the project runs with a containerized PostgreSQL 13 database. However, if administrators prefer to use an external database, they can easily redefine the necessary environment variables (they are prefixed with POSTGRES_) in the docker-compose.yaml file for jtt-webapp service to point to their external database. -- Ensure that the Docker daemon is running before executing the scripts. -- The `proxy` service is used to handle SSL termination and forward requests to the web application service. Ensure that the certificates and keys are correctly configured in the `proxy` directory. -- Adjustments may be required based on specific deployment environments and additional requirements. -- If you want Time Tracker jira plugin to write logs to a separate file and not the main jira log file, add the content of to the `log4j.properties` file to the corresponding file in your jira installation. -- For updating the web application service, you can run the `./timetracker.sh update` command. This will pull the latest image from the repository and restart the service. diff --git a/custom_images/favicon-no-tracking.ico b/custom_images/favicon-no-tracking.ico deleted file mode 100644 index 777367d..0000000 Binary files a/custom_images/favicon-no-tracking.ico and /dev/null differ diff --git a/custom_images/favicon.ico b/custom_images/favicon.ico deleted file mode 100644 index eb8afeb..0000000 Binary files a/custom_images/favicon.ico and /dev/null differ diff --git a/custom_images/logo-dark.svg b/custom_images/logo-dark.svg deleted file mode 100644 index eb15618..0000000 --- a/custom_images/logo-dark.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/custom_images/logo.svg b/custom_images/logo.svg deleted file mode 100644 index 030912d..0000000 --- a/custom_images/logo.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 81e0ff9..0000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,86 +0,0 @@ -version: "3.4" - -services: - jtt-webapp: - image: "nexus-docker-time-tracking.in.devexperts.com/jira-time-tracking-app/jtt-webapp:build${VERSION_NUMBER}" - container_name: jtt-webapp-build${VERSION_NUMBER} - restart: always - ports: - - "127.0.0.1:8080:8080" - environment: - - WAIT_HOSTS=jtt-postgres:5432 - - JAVA_TOOL_OPTIONS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 - - VERSION=build${VERSION_NUMBER} - - SPRING_PROFILES_ACTIVE=local,docker - - JIRA_URL=${JIRA_URL} - - JTT_ALLOWED_ORIGINS=http://${JTT_WEBAPP_HOST},https://${JTT_WEBAPP_HOST} - - JTT_WEBAPP_HOST=${JTT_WEBAPP_HOST} - - JTT_WEBAPP_PORT=80 - - JTT_USE_FIXED_RULES=false - - POSTGRES_HOST=jtt-postgres - - POSTGRES_PORT=5432 - - POSTGRES_DB=jtt - - POSTGRES_USER=jtt - - POSTGRES_PASSWORD=jtt - - OAUTH_CONSUMER_KEY=${OAUTH_CONSUMER_KEY} - - OAUTH_ACCESS_TOKEN=${OAUTH_ACCESS_TOKEN} - - OAUTH_PRIVATE_KEY=${OAUTH_PRIVATE_KEY} - - OAUTH_SECRET=${OAUTH_SECRET} - volumes: - - dumps:/opt/dumps - - ../log:/log - networks: - - backend - expose: - - "8080" - - jtt-proxy: - image: nginx:latest - container_name: jtt-proxy - volumes: - - ./proxy/${FULL_CHAIN_PEM}:/etc/nginx/fullchain.pem - - ./proxy/${PRIVATE_KEY_PEM}:/etc/nginx/privkey.pem - - ./proxy/nginx.conf:/etc/nginx/nginx.conf - ports: - - "80:80" - - "443:443" - networks: - - backend - - jtt-postgres: - image: "postgres:13.1" - container_name: jtt-postgres - environment: - - POSTGRES_DB=jtt - - POSTGRES_USER=jtt - - POSTGRES_PASSWORD=jtt - - PGDATA=/var/lib/postgresql/data/pgdata - volumes: - - ~/jtt/postgres_data:/var/lib/postgresql - ports: - - "5432:5432" - restart: always - networks: - - backend - - jtt-ui: - image: "nexus-docker-time-tracking.in.devexperts.com/jira-time-tracking-app/jtt-ui:build${VERSION_NUMBER}" - container_name: jtt-ui-build${VERSION_NUMBER} - ports: - - "127.0.0.1:8081:80" - - "127.0.0.1:6006:6006" - restart: always - volumes: - - ./ui-nginx:/etc/nginx/ - - ./custom_images:/usr/share/nginx/html/custom_images - stdin_open: true - networks: - - backend - -networks: - backend: - external: true - -volumes: - dumps: - external: true \ No newline at end of file diff --git a/link-creation/OAuthClient-1.0.jar b/link-creation/OAuthClient-1.0.jar deleted file mode 100644 index 39097e1..0000000 Binary files a/link-creation/OAuthClient-1.0.jar and /dev/null differ diff --git a/link-creation/run.sh b/link-creation/run.sh deleted file mode 100755 index 37499ed..0000000 --- a/link-creation/run.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2024 Devexperts Solutions IE Limited -# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -# If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - -######################################################################### -echo '[LOG] Create config.properties file' - -echo 'consumer_key='$1 > config.properties -echo 'jira_home='$2 >> config.properties -echo 'private_key='$3 >> config.properties - -echo '[LOG] Configuration properties file created' -echo '[TEST LOG] Content of config.properties' -cat config.properties -echo '\n' -######################################################################### -echo '[LOG] Get Request token' -java -jar OAuthClient-1.0.jar requestToken $2 -echo '\n' -######################################################################### -echo '[LOG] Define requestToken variable' -requestToken=$(grep request_token config.properties | cut -d= -f 2) -echo '[TEST LOG] Request token is: '$requestToken -echo '\n' -######################################################################### -echo '[LOG] END' -######################################################################### diff --git a/link-creation/run2.sh b/link-creation/run2.sh deleted file mode 100755 index f376eeb..0000000 --- a/link-creation/run2.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2024 Devexperts Solutions IE Limited -# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -# If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - -java -jar DevexJiraOAuthClient-1.0.jar accessToken $1 \ No newline at end of file diff --git a/log4j.properties b/log4j.properties deleted file mode 100644 index a7ca42e..0000000 --- a/log4j.properties +++ /dev/null @@ -1,15 +0,0 @@ -##################################################### -# Jira Time Tracking plugin -##################################################### - -# Appender Configuration -log4j.appender.plugin-logger=com.atlassian.jira.logging.JiraHomeAppender -log4j.appender.plugin-logger.File=jtt-plugin-log.log -log4j.appender.plugin-logger.MaxFileSize=20480KB -log4j.appender.plugin-logger.com.atlassian.MaxBackupIndex=5 -log4j.appender.plugin-logger.layout=com.atlassian.logging.log4j.NewLineIndentingFilteringPatternLayout -log4j.appender.plugin-logger.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSSZ} %t %p %X{jira.username} %X{jira.request.id} %X{jira.request.assession.id} %X{jira.request.url} %m%n - -# Logger Configuration -log4j.logger.com.devexperts.jtt.jira.plugin = WARN, plugin-logger -log4j.additivity.com.devexperts.jtt.jira.plugin = false \ No newline at end of file diff --git a/proxy/nginx.conf.template b/proxy/nginx.conf.template deleted file mode 100644 index a339793..0000000 --- a/proxy/nginx.conf.template +++ /dev/null @@ -1,113 +0,0 @@ -user nginx; - -# error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -worker_processes 8; - -worker_rlimit_nofile 30000; - -events { - worker_connections 1024; - multi_accept off; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - server_names_hash_bucket_size 128; - - client_max_body_size 64m; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - # access_log /var/log/nginx/access.log main buffer=16k flush=2m; - - sendfile on; - tcp_nopush on; - - tcp_nodelay on; - - keepalive_timeout 65; - keepalive_requests 100; - - server_tokens off; - - server { - listen 80; - - server_name ${JTT_WEBAPP_HOST}; - - return 307 https://${JTT_WEBAPP_HOST}$request_uri; - } - - server { - listen 443 ssl; - - server_name ${JTT_WEBAPP_HOST}; - - index index.html index.htm; - - # Add SSL - ssl_certificate "/etc/nginx/${FULL_CHAIN_PEM}"; - ssl_certificate_key "/etc/nginx/${PRIVATE_KEY_PEM}"; - # ssl_protocols option does not support quotes - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA38"; - ssl_ecdh_curve "secp384r1"; - ssl_session_cache "shared:SSL:5m"; - ssl_session_tickets "off"; - - # Add header - add_header X-Frame-Options "SAMEORIGIN"; - # Ensure Strict-Transport-Security header for ssl listener - add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; - - charset utf8; - - gzip on; - gzip_comp_level 6; - gzip_vary on; - gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype; - - ## Proxy settings - proxy_connect_timeout 1800; - proxy_read_timeout 1800; - proxy_send_timeout 1800; - proxy_buffer_size 4k; - proxy_buffers 4 32k; - proxy_busy_buffers_size 64k; - proxy_temp_file_write_size 64k; - proxy_intercept_errors on; - proxy_cache off; - - location /ws/sse { - proxy_pass http://jtt-webapp:8080; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - # WebSocket support - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - } - - location /v1 { - proxy_pass http://jtt-webapp:8080; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-Host $http_host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - } - - location / { - proxy_pass http://jtt-ui:80; - } - } -} \ No newline at end of file diff --git a/timetracker.sh b/timetracker.sh deleted file mode 100755 index c72aa0c..0000000 --- a/timetracker.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2024 Devexperts Solutions IE Limited -# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -# If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. - -check_env_var() { - if [ -z "${!1}" ]; then - echo "Error: $1 is not set in the .env file." - exit 1 - fi -} - -if [ -f .env ]; then - set -a - source .env - set +a -else - echo ".env file not found." - exit 1 -fi - -check_env_var "VERSION_NUMBER" -check_env_var "OAUTH_CONSUMER_KEY" -check_env_var "OAUTH_ACCESS_TOKEN" -check_env_var "OAUTH_PRIVATE_KEY" -check_env_var "OAUTH_SECRET" -check_env_var "JIRA_URL" -check_env_var "JTT_WEBAPP_HOST" -check_env_var "DH_PEM" -check_env_var "FULL_CHAIN_PEM" -check_env_var "PRIVATE_KEY_PEM" - -docker_login() { - if [ -n "${DOCKER_USERNAME}" ] && [ -n "${DOCKER_PASSWORD}" ]; then - echo "Logging in to Docker registry..." - docker login nexus-docker-time-tracking.in.devexperts.com -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" - else - echo "Docker credentials not set. Skipping docker login." - fi -} - -case $1 in - init) - docker_login - docker volume create backend - docker volume create dumps - envsubst '${JTT_WEBAPP_HOST} ${FULL_CHAIN_PEM} ${PRIVATE_KEY_PEM} ${DH_PEM}' < jtt-proxy/nginx.conf.template > jtt-proxy/nginx.conf - ;; - start) - docker-compose up -d - ;; - stop) - docker-compose down - ;; - restart) - docker-compose down && docker-compose up -d - ;; - update) - docker-compose down - docker_login - docker-compose up -d - ;; - *) - echo "Unknown parameter. Doing nothing" - ;; -esac diff --git a/ui-nginx/conf.d/default.conf b/ui-nginx/conf.d/default.conf deleted file mode 100644 index 9277097..0000000 --- a/ui-nginx/conf.d/default.conf +++ /dev/null @@ -1,9 +0,0 @@ -server { - listen 80; - server_name localhost; - root /usr/share/nginx/html; - gzip on; - gzip_min_length 1000; - gzip_proxied expired no-cache no-store private auth; - gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript; -} \ No newline at end of file diff --git a/ui-nginx/mime.types b/ui-nginx/mime.types deleted file mode 100644 index f382d32..0000000 --- a/ui-nginx/mime.types +++ /dev/null @@ -1,49 +0,0 @@ -types { - text/html html htm shtml; - text/css css; - text/xml xml rss; - image/gif gif; - image/jpeg jpeg jpg; - application/x-javascript js; - text/plain txt; - text/x-component htc; - text/mathml mml; - image/png png; - image/svg+xml svg; - image/x-icon ico; - image/x-jng jng; - image/vnd.wap.wbmp wbmp; - application/java-archive jar war ear; - application/mac-binhex40 hqx; - application/pdf pdf; - application/x-cocoa cco; - application/x-java-archive-diff jardiff; - application/x-java-jnlp-file jnlp; - application/x-makeself run; - application/x-perl pl pm; - application/x-pilot prc pdb; - application/x-rar-compressed rar; - application/x-redhat-package-manager rpm; - application/x-sea sea; - application/x-shockwave-flash swf; - application/x-stuffit sit; - application/x-tcl tcl tk; - application/x-x509-ca-cert der pem crt; - application/x-xpinstall xpi; - application/zip zip; - application/octet-stream deb; - application/octet-stream bin exe dll; - application/octet-stream dmg; - application/octet-stream eot; - application/octet-stream iso img; - application/octet-stream msi msp msm; - audio/mpeg mp3; - audio/x-realaudio ra; - video/mpeg mpeg mpg; - video/quicktime mov; - video/x-flv flv; - video/x-msvideo avi; - video/x-ms-wmv wmv; - video/x-ms-asf asx asf; - video/x-mng mng; -} \ No newline at end of file diff --git a/ui-nginx/nginx.conf b/ui-nginx/nginx.conf deleted file mode 100644 index 56ea376..0000000 --- a/ui-nginx/nginx.conf +++ /dev/null @@ -1,26 +0,0 @@ -user nginx; -worker_processes 1; - -error_log /var/log/nginx/error.log warn; -pid /var/run/nginx.pid; - -events { - worker_connections 1024; -} - -http { - include /etc/nginx/mime.types; - default_type application/octet-stream; - - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log /var/log/nginx/access.log main; - - sendfile on; - - keepalive_timeout 65; - - include /etc/nginx/conf.d/*.conf; -}