-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into regulations-admin/format-amending-and-cancel…
…-reg
- Loading branch information
Showing
222 changed files
with
2,738 additions
and
1,238 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
export AWS_PROFILE=islandis-dev |
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,2 @@ | ||
aws-config.ini | ||
!.envrc.default |
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,97 @@ | ||
ARG RUST_VERSION=1.78 | ||
ARG FEDORA_VERSION=39 | ||
FROM docker.io/rust:${RUST_VERSION} as cargo-bins | ||
|
||
# Build dependencies | ||
RUN --mount=type=cache,target=/var/cache/apt \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
make=4.3-4.1 cmake=3.25.1-1 g++=4:12.2.0-3 | ||
|
||
# Install cargo binaries | ||
RUN --mount=type=cache,target=/root/.cargo \ | ||
cargo install starship | ||
|
||
FROM docker.io/rust:${RUST_VERSION} as cargo-volta | ||
WORKDIR /build/volta | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN --mount=type=cache,target=/root/.cargo/ --mount=type=cache,target=/root/.cache/ \ | ||
git init && \ | ||
(git remote | grep -q origin || git remote add origin https://github.com/volta-cli/volta) && \ | ||
git fetch origin && \ | ||
git checkout origin/main --force && \ | ||
cargo build --release | ||
RUN ls -lah . && ls -lah -R target/ | ||
|
||
|
||
FROM registry.fedoraproject.org/fedora:${FEDORA_VERSION} as base | ||
|
||
####################### | ||
# System dependencies # | ||
####################### | ||
# We're mounting the cache, so we don't need to `clean all` (DL3040). | ||
# Tried pinning versions, but got errors from version solver (DL3041). | ||
# hadolint ignore=DL3040,DL3041 | ||
RUN --mount=type=cache,target=/var/cache/dnf \ | ||
dnf install -y \ | ||
# Basic requirements | ||
bash zsh git java-11-openjdk gcc-c++ jq graphviz python3-devel \ | ||
# AWS/DevOps specific dependencies | ||
awscli2 \ | ||
# Niceties | ||
the_silver_searcher ripgrep fzf neovim | ||
|
||
ENV SHELL=bash | ||
ARG SHELL=${SHELL} | ||
ENV USERNAME=root | ||
ARG USERNAME=${USERNAME} | ||
|
||
# Create user and environment | ||
RUN grep "${USERNAME}" /etc/passwd || useradd -m -s /bin/${SHELL} -G wheel ${USERNAME} | ||
USER ${USERNAME} | ||
WORKDIR /tmp/build-workdir | ||
|
||
|
||
|
||
###################### | ||
# User configuration # | ||
###################### | ||
|
||
|
||
# "Install" volta & starship | ||
COPY --from=cargo-bins /usr/local/cargo/bin/starship /usr/local/bin/ | ||
COPY --from=cargo-volta \ | ||
/build/volta/target/release/volta \ | ||
/build/volta/target/release/volta-shim \ | ||
/build/volta/target/release/volta-migrate \ | ||
/usr/local/bin/ | ||
|
||
RUN volta setup | ||
|
||
# Set up node/yarn | ||
COPY package.json . | ||
RUN . ~/.${SHELL}rc && volta install "node@$(jq -r '.engines.node' package.json)" | ||
|
||
# Install brew for additional binaries | ||
RUN \ | ||
touch /.dockerenv && \ | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \ | ||
rm /.dockerenv | ||
|
||
# Set up user's shell config | ||
SHELL ["/bin/bash", "-o", "pipefail", "-c"] | ||
RUN \ | ||
# Initialize starship prompt | ||
echo "eval \"\$(starship init ${SHELL})\"" | tee -a ~/.${SHELL}rc && \ | ||
# Set vi mode in shell | ||
echo "set -o vi" | tee -a ~/.${SHELL}rc \ | ||
# Set default AWS_PROFILE | ||
echo "export AWS_PROFILE=islandis-dev" | tee -a ~/.${SHELL}rc | ||
|
||
# The local machine ID is different from the host, so we get NX cache poisoning warnings. | ||
# This "fixes" it, but not very clean. | ||
# Docs: https://nx.dev/troubleshooting/unknown-local-cache | ||
# https://stackoverflow.com/a/63148464 | ||
# RUN echo "NX_REJECT_UNKNOWN_LOCAL_CACHE=0" >> /home/${USERNAME}/.${SHELL}rc | ||
|
||
WORKDIR /workspaces/island.is |
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,21 @@ | ||
|
||
[profile islandis-dev] | ||
sso_start_url = https://island-is.awsapps.com/start | ||
sso_account_id = 013313053092 | ||
sso_role_name = AWSPowerUserAccess | ||
sso_region = eu-west-1 | ||
region = eu-west-1 | ||
|
||
[profile islandis-staging] | ||
sso_start_url = https://island-is.awsapps.com/start | ||
sso_account_id = 261174024191 | ||
sso_role_name = Secret_Service | ||
sso_region = eu-west-1 | ||
region = eu-west-1 | ||
|
||
[profile islandis-prod] | ||
sso_start_url = https://island-is.awsapps.com/start | ||
sso_account_id = 251502586493 | ||
sso_role_name = Secret_Service | ||
sso_region = eu-west-1 | ||
region = eu-west-1 |
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,22 @@ | ||
// vi: ft=jsonc | ||
{ | ||
"name": "Devcontainer for island.is", | ||
"build": { "dockerfile": "Dockerfile", "context": "../" }, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["dbaeumer.vscode-eslint"] | ||
} | ||
}, | ||
"privileged": true, | ||
"runArgs": ["--name=devcontainer-islandis"], | ||
"postCreateCommands": [ | ||
"cp .devcontainer/aws-config.default.ini .devcontainer/aws-config.ini", | ||
"cp .devcontainer/.envrc.default .devcontainer/.envrc" | ||
], | ||
"containerEnv": { | ||
"AWS_CONFIG_FILE": "${containerWorkspaceFolder}/.devcontainer/aws-config.ini", | ||
"IS_DEVCONTAINER": true | ||
}, | ||
|
||
"forwardPorts": [3000, 3333, 4200, 4242] | ||
} |
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 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 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 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
27 changes: 27 additions & 0 deletions
27
apps/judicial-system/backend/migrations/20240621103420-update-case.js
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,27 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
async up(queryInterface) { | ||
return queryInterface.sequelize.transaction((transaction) => | ||
Promise.all([ | ||
queryInterface.bulkUpdate( | ||
'case', | ||
{ state: 'RECEIVED' }, | ||
{ state: 'MAIN_HEARING' }, | ||
{ transaction }, | ||
), | ||
queryInterface.bulkUpdate( | ||
'case_file', | ||
{ category: 'CASE_FILE' }, | ||
{ category: 'COVER_LETTER' }, | ||
{ transaction }, | ||
), | ||
]), | ||
) | ||
}, | ||
|
||
async down() { | ||
// Nothing to do here | ||
return | ||
}, | ||
} |
25 changes: 25 additions & 0 deletions
25
apps/judicial-system/backend/migrations/20240623202256-update-case.js
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,25 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
return queryInterface.sequelize.transaction((transaction) => | ||
queryInterface.addColumn( | ||
'case', | ||
'court_session_type', | ||
{ | ||
type: Sequelize.STRING, | ||
allowNull: true, | ||
}, | ||
{ transaction }, | ||
), | ||
) | ||
}, | ||
|
||
async down(queryInterface) { | ||
return queryInterface.sequelize.transaction((transaction) => | ||
queryInterface.removeColumn('case', 'court_session_type', { | ||
transaction, | ||
}), | ||
) | ||
}, | ||
} |
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
Oops, something went wrong.