-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1378 from swisstopo/feature/viewer-1353-ausführen…
…-auf-windows Feature 1353: ausführen auf windows
- Loading branch information
Showing
14 changed files
with
146 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,14 @@ | ||
# Application | ||
APP_PORT=3000 | ||
|
||
# Cognito | ||
COGNITO_AWS_REGION=eu-west-1 | ||
COGNITO_CLIENT_ID=10h1tga4i933buv25lelalmtrn | ||
COGNITO_POOL_ID=eu-west-1_dbfEb2FuH | ||
|
||
# S3 | ||
S3_AWS_REGION=eu-west-1 | ||
AWS_ACCESS_KEY_ID=minio | ||
AWS_SECRET_ACCESS_KEY=minio123 | ||
S3_BUCKET=ngmpub-userdata-local | ||
PROJECTS_S3_BUCKET=ngmpub-project-files-local | ||
S3_ENDPOINT=http://minio:9000 | ||
|
||
# Database | ||
PGUSER=www-data | ||
PGPASSWORD=www-data | ||
PGHOST=db | ||
PGPORT=5432 | ||
PGDATABASE=swissgeol-local | ||
|
||
# sqlx | ||
# SQLx | ||
DATABASE_URL=postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:${PGPORT}/${PGDATABASE} | ||
|
||
# S3 | ||
S3_AWS_REGION=eu-west-1 | ||
AWS_ACCESS_KEY_ID=minio | ||
AWS_SECRET_ACCESS_KEY=minio123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
SQLX_VERSION=0.7.3 | ||
if [[ ! -f ~/.cargo/bin/sqlx ]] || [[ $(sqlx --version) != "sqlx-cli $SQLX_VERSION" ]]; then | ||
cargo install sqlx-cli --version $SQLX_VERSION --no-default-features --features native-tls,postgres --locked | ||
fi | ||
|
||
sqlx database create | ||
sqlx migrate run | ||
|
||
cargo watch --poll --shell "cargo run" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import {readFileSync, writeFileSync} from 'node:fs'; | ||
import * as path from 'node:path'; | ||
|
||
import * as util from 'node:util'; | ||
import {exec as execSync} from 'node:child_process'; | ||
const exec = util.promisify(execSync); | ||
|
||
const cesiumPackagePath = path.resolve(import.meta.dirname, '../node_modules/cesium/package.json'); | ||
const cesiumPackageString = readFileSync(cesiumPackagePath, 'utf-8'); | ||
const cesiumVersion = JSON.parse(cesiumPackageString).version; | ||
|
||
const commitHash = (await exec('git rev-list HEAD -1')).stdout.trim(); | ||
|
||
const now = new Date(); | ||
const date = new Intl.DateTimeFormat('en-CA', { | ||
year: 'numeric', | ||
month: '2-digit', | ||
day: '2-digit', | ||
hour: '2-digit', | ||
minute: '2-digit', | ||
timeZoneName: 'longOffset', | ||
hourCycle: 'h23' | ||
}).format(now).replace(', ', 'T').replace(' GMT', ''); | ||
|
||
const versionsFilePath = path.resolve(import.meta.dirname, '../dist/versions.json'); | ||
writeFileSync(versionsFilePath, JSON.stringify({ | ||
build: date, | ||
commit_hash: commitHash, | ||
cesium: cesiumVersion, | ||
}, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as fs from 'node:fs'; | ||
import * as path from 'node:path'; | ||
import {marked} from 'marked'; | ||
|
||
const legalDir = path.resolve(import.meta.dirname, '../legal/'); | ||
const legalDistDir = path.resolve(import.meta.dirname, '../dist/legal/'); | ||
fs.mkdirSync(legalDistDir, {recursive: true}); | ||
fs.copyFileSync( | ||
path.resolve(legalDir, 'index.css'), | ||
path.resolve(legalDistDir, 'index.css'), | ||
); | ||
|
||
const template = fs.readFileSync(path.resolve(legalDir, 'template.html'), 'utf-8'); | ||
|
||
const files = await fs.promises.readdir(legalDir, {withFileTypes: true}); | ||
for (const file of files) { | ||
if (!file.isFile()) { | ||
continue; | ||
} | ||
if (!file.name.endsWith('.md')) { | ||
continue; | ||
} | ||
|
||
const fileMarkdown = fs.readFileSync(path.resolve(file.parentPath, file.name), 'utf-8'); | ||
const fileHtml = marked(fileMarkdown); | ||
const legalHtml = template.replace('_CONTENT_', fileHtml); | ||
|
||
const fileNameHtml = `${file.name.slice(0, -3)}.html`; | ||
fs.writeFileSync(path.resolve(legalDistDir, fileNameHtml), legalHtml); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,6 +128,7 @@ export default { | |
], | ||
compress: true, | ||
port: 8000, | ||
hot: true, | ||
|
||
}, | ||
plugins: [ | ||
|