mirror of https://github.com/doccano/doccano.git
Browse Source
Merge pull request #1801 from doccano/enhancement/removeUnusedFiles
Merge pull request #1801 from doccano/enhancement/removeUnusedFiles
Enhancement/remove unused filespull/1802/head
Hiroki Nakayama
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 175 deletions
Split View
Diff Options
-
28frontend/components/metrics/ChartDoughnut.vue
-
33tools/azure.sh
-
10tools/create-admin.sh
-
14tools/dev-celery.sh
-
28tools/dev-django.sh
-
20tools/dev-nuxt.sh
-
42tools/install-mssql.sh
@ -1,28 +0,0 @@ |
|||
<script> |
|||
import { Doughnut, mixins } from 'vue-chartjs' |
|||
const { reactiveProp } = mixins |
|||
|
|||
export default { |
|||
extends: Doughnut, |
|||
mixins: [reactiveProp], |
|||
props: { |
|||
chartData: { |
|||
type: Object, |
|||
default: () => {}, |
|||
required: true |
|||
} |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
options: { |
|||
maintainAspectRatio: false |
|||
} |
|||
} |
|||
}, |
|||
|
|||
mounted() { |
|||
this.renderChart(this.chartData, this.options) |
|||
} |
|||
} |
|||
</script> |
@ -1,33 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -o errexit |
|||
|
|||
if [[ -z "${DOCCANO_LOCATION}" ]]; then echo "Missing DOCCANO_LOCATION environment variable" >&2; exit 1; fi |
|||
if [[ -z "${DOCCANO_RESOURCE_GROUP}" ]]; then echo "Missing DOCCANO_LOCATION environment variable" >&2; exit 1; fi |
|||
if [[ -z "${DOCCANO_APP_NAME}" ]]; then echo "Missing DOCCANO_APP_NAME environment variable" >&2; exit 1; fi |
|||
if [[ -z "${DOCCANO_SECRET_KEY}" ]]; then echo "Missing DOCCANO_SECRET_KEY environment variable" >&2; exit 1; fi |
|||
if [[ -z "${DOCCANO_ADMIN_USERNAME}" ]]; then echo "Missing DOCCANO_ADMIN_USERNAME environment variable" >&2; exit 1; fi |
|||
if [[ -z "${DOCCANO_ADMIN_CONTACT_EMAIL}" ]]; then echo "Missing DOCCANO_ADMIN_CONTACT_EMAIL environment variable" >&2; exit 1; fi |
|||
if [[ -z "${DOCCANO_ADMIN_PASSWORD}" ]]; then echo "Missing DOCCANO_ADMIN_PASSWORD environment variable" >&2; exit 1; fi |
|||
if ! az account show >/dev/null; then echo "Must be logged into Azure" >&2; exit 2; fi |
|||
|
|||
set -o nounset |
|||
|
|||
az group create \ |
|||
--location "${DOCCANO_LOCATION}" \ |
|||
--name "${DOCCANO_RESOURCE_GROUP}" |
|||
|
|||
az group deployment create \ |
|||
--resource-group "${DOCCANO_RESOURCE_GROUP}" \ |
|||
--name "azuredeploy$1" \ |
|||
--parameters \ |
|||
appName="${DOCCANO_APP_NAME}" \ |
|||
secretKey="${DOCCANO_SECRET_KEY}" \ |
|||
adminUserName="${DOCCANO_ADMIN_USERNAME}" \ |
|||
adminContactEmail="${DOCCANO_ADMIN_CONTACT_EMAIL}" \ |
|||
adminPassword="${DOCCANO_ADMIN_PASSWORD}" \ |
|||
dockerImageName="${DOCKER_REGISTRY:-${DOCKER_USERNAME:-doccano}}/doccano:${1:-latest}" \ |
|||
dockerRegistry="${DOCKER_REGISTRY}" \ |
|||
dockerRegistryUserName="${DOCKER_USERNAME}" \ |
|||
dockerRegistryPassword="${DOCKER_PASSWORD}" \ |
|||
--template-file azuredeploy.json |
@ -1,10 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -o errexit |
|||
set -o nounset |
|||
|
|||
if [[ "$#" -ne 3 ]]; then echo "Usage: $0 <username> <email> <password>" >&2; exit 1; fi |
|||
|
|||
python app/manage.py wait_for_db |
|||
python app/manage.py migrate |
|||
python app/manage.py create_admin --noinput --username="$1" --email="$2" --password="$3" |
@ -1,14 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -o errexit |
|||
set -o nounset |
|||
|
|||
cd "/src/backend" |
|||
|
|||
( |
|||
echo "Waiting for database" |
|||
python manage.py wait_for_db |
|||
|
|||
echo "Starting celery" |
|||
"watchmedo" auto-restart --directory="." --pattern="*.py" --recursive -- "celery" --app=config worker --loglevel=info --pool=solo |
|||
) |
@ -1,28 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -o errexit |
|||
|
|||
if [[ -z "${ADMIN_USERNAME}" ]]; then echo "Missing ADMIN_USERNAME environment variable" >&2; exit 1; fi |
|||
if [[ -z "${ADMIN_PASSWORD}" ]]; then echo "Missing ADMIN_PASSWORD environment variable" >&2; exit 1; fi |
|||
if [[ -z "${ADMIN_EMAIL}" ]]; then echo "Missing ADMIN_EMAIL environment variable" >&2; exit 1; fi |
|||
|
|||
set -o nounset |
|||
|
|||
app="/src/backend" |
|||
|
|||
echo "Initializing database" |
|||
python "${app}/manage.py" wait_for_db |
|||
python "${app}/manage.py" migrate |
|||
python "${app}/manage.py" create_roles |
|||
|
|||
if [[ -n "${ADMIN_USERNAME}" ]] && [[ -n "${ADMIN_PASSWORD}" ]] && [[ -n "${ADMIN_EMAIL}" ]]; then |
|||
python "${app}/manage.py" create_admin \ |
|||
--username "${ADMIN_USERNAME}" \ |
|||
--password "${ADMIN_PASSWORD}" \ |
|||
--email "${ADMIN_EMAIL}" \ |
|||
--noinput \ |
|||
|| true |
|||
fi |
|||
|
|||
echo "Starting django" |
|||
python -u "${app}/manage.py" runserver ${HOST:-0.0.0.0}:${PORT:-8000} |
@ -1,20 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -o errexit |
|||
set -o nounset |
|||
|
|||
root="$(dirname "$0")/.." |
|||
app="${root}/frontend" |
|||
|
|||
( |
|||
cd "${app}" |
|||
|
|||
if [[ ! -d node_modules/.bin ]]; then |
|||
echo "Installing dependencies" |
|||
yarn install |
|||
fi |
|||
|
|||
echo "Starting frontend server" |
|||
yarn lintfix |
|||
yarn dev |
|||
) |
@ -1,42 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
set -o errexit |
|||
set -o nounset |
|||
|
|||
# parse arguments |
|||
mode="prod" |
|||
for opt in "$@"; do |
|||
case "${opt}" in |
|||
--dev) mode="dev" ;; |
|||
esac |
|||
done |
|||
|
|||
set -eo pipefail |
|||
|
|||
# install build dependencies |
|||
apt-get update |
|||
apt-get install --no-install-recommends -y --allow-downgrades \ |
|||
curl \ |
|||
gnupg=2.1.18-8~deb9u4 \ |
|||
apt-transport-https |
|||
|
|||
# install dependency to compile django-pyodbc-azure |
|||
if [[ "${mode}" = "dev" ]]; then |
|||
apt-get install --no-install-recommends -y \ |
|||
unixodbc-dev=2.3.4-1 |
|||
fi |
|||
|
|||
# add mssql repo |
|||
curl -fsS https://packages.microsoft.com/keys/microsoft.asc | apt-key add - |
|||
curl -fsS https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql.list |
|||
apt-get update |
|||
|
|||
# install mssql |
|||
ACCEPT_EULA=Y apt-get install --no-install-recommends -y \ |
|||
msodbcsql17=17.3.1.1-1 \ |
|||
mssql-tools=17.3.0.1-1 |
|||
|
|||
# remove build dependencies and artifacts |
|||
apt-get remove -y \ |
|||
curl gnupg apt-transport-https |
|||
rm -rf /var/lib/apt/lists/* |
Write
Preview
Loading…
Cancel
Save