Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu

RUN apt-get update && apt-get install -y nginx httpie
RUN apt-get update && apt-get install -y gnupg2 nginx httpie iputils-ping

EXPOSE 3000
32 changes: 32 additions & 0 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
services:
devcontainer:
image: auth/devcontainer:0.1.0
build: ./.devcontainer
container_name: auth-devcontainer
networks:
auth:
aliases:
- api
- app
volumes:
- .:/workspaces/auth:cached
tty: true
stdin_open: true
command: /bin/bash
environment:
NITRO_HOST: 0.0.0.0
NITRO_PORT: 3001
NUXT_APP_BASE_URL: /
NUXT_PUBLIC_API_URL: http://localhost:3000

API_SERVER_HOST: 0.0.0.0
API_SERVER_PORT: 3000
API_TOKEN_ISSUER: auth
API_TOKEN_SECRET: your-secret
API_DATABASE_HOST: auth-database-1
API_DATABASE_PORT: 26257
API_DATABASE_NAME: dev
API_DATABASE_USERNAME: dev
API_DATABASE_PASSWORD: your-password
API_CACHE_HOST: auth-cache
API_CACHE_PORT: 6379
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"features": {
"ghcr.io/devcontainers/features/node:2.0.0": {
"version": "2.0.0",
"resolved": "ghcr.io/devcontainers/features/node@sha256:fedd4c11f7adfb64283b578dddc7da906728daa25fa293351c9d913231acf12f",
"integrity": "sha256:fedd4c11f7adfb64283b578dddc7da906728daa25fa293351c9d913231acf12f"
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "1.5.0",
"resolved": "ghcr.io/devcontainers/features/rust@sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c",
"integrity": "sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c"
}
}
}
48 changes: 30 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
"name": "basketball",
"dockerComposeFile": ["../docker-compose.yml", "docker-compose.devcontainer.yml"],
"name": "auth",
"dockerComposeFile": ["../compose.yaml", "./compose.yaml"],
"service": "devcontainer",
"runServices": [
"database",
"database-1",
"database-2",
"database-3",
"init-database",
"init-cluster",
"migrate-cluster",
"cache",
"metrics",
"monitoring",
"devcontainer"
],
"workspaceFolder": "/workspace/basketball",
"workspaceFolder": "/workspaces/auth",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/node:2.0.0": {},
"ghcr.io/devcontainers/features/rust:1": {}
},
"postStartCommand": "sudo service nginx start && exit",
"postCreateCommand": "cd ./app && npm install && cd ../api && cargo build && cargo install cargo-watch --locked && git config --global sequence.editor \"code --wait\"",
"forwardPorts": [3000],
"updateContentCommand": "${containerWorkspaceFolder}/.devcontainer/updateContentCommand.sh",
"postAttachCommand": "${containerWorkspaceFolder}/.devcontainer/postAttachCommand.sh",
"forwardPorts": ["auth-devcontainer:3000", "auth-devcontainer:3001", "auth-database-1:8080"],
"portsAttributes": {
"3000": {
"label": "NGINX Proxy",
"auth-devcontainer:3000": {
"label": "Auth API",
"onAutoForward": "silent"
},
"auth-devcontainer:3001": {
"label": "Auth App",
"onAutoForward": "silent"
},
"auth-database-1:8080": {
"label": "Auth Database",
"onAutoForward": "silent"
}
},
"remotePorts": [{ "containerPort": 3000, "localPort": 3000 }],
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"mounts": ["source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"],
"customizations": {
"vscode": {
Expand Down Expand Up @@ -105,7 +111,7 @@
"terminal.integrated.wordWrap": "off",

"chat.agent.enabled": false,
"chat.agentsControl.enabled": false,
"chat.agentsControl.enabled": "hidden",
"chat.checkpoints.enabled": false,
"chat.extensionTools.enabled": false,
"chat.tips.enabled": false,
Expand All @@ -117,7 +123,6 @@
"**/.output": true,
"**/node_modules": true
},
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.codeActionsOnSave": {
"source.organizeImports": "never",
"source.fixAll.oxc": "always",
Expand All @@ -129,12 +134,19 @@
"oxc.fixKind": "all",
"oxc.trace.server": "verbose",
"oxc.typeAware": true,
"oxc.fmt.configPath": "./app",
"oxc.configPath": null,
"oxc.disableNestedConfig": false,

"rust-analyzer.check.command": "clippy",
"rust-analyzer.cargo.buildScripts.enable": true,
"#js/ts.suggest.completeFunctionCalls#": true,
"#js/ts.preferences.importModuleSpecifier#": "non-relative"
"#js/ts.preferences.importModuleSpecifier#": "non-relative",

"[html]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},

"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
}
Expand Down
25 changes: 0 additions & 25 deletions .devcontainer/docker-compose.devcontainer.yml

This file was deleted.

72 changes: 0 additions & 72 deletions .devcontainer/nginx/conf.d/default.conf

This file was deleted.

4 changes: 4 additions & 0 deletions .devcontainer/postAttachCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

git config --global sequence.editor \"code --wait\"
8 changes: 8 additions & 0 deletions .devcontainer/updateContentCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

cargo install cargo-watch --locked

cd ./app && npm install || true

cd ../api && cargo build || true
8 changes: 8 additions & 0 deletions .github/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
addReviewers: true

addAssignees: true

reviewers:
- botprzemek

numberOfReviewers: 0
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: .
schedule:
interval: weekly

- package-ecosystem: cargo
directory: ./api
schedule:
interval: weekly

- package-ecosystem: npm
directory: ./app
schedule:
interval: weekly

- package-ecosystem: devcontainers
directory: ./.devcontainer
schedule:
interval: weekly

- package-ecosystem: docker
directories: [./api, ./app]
schedule:
interval: weekly

- package-ecosystem: docker-compose
directory: .
schedule:
interval: weekly
14 changes: 14 additions & 0 deletions .github/workflows/auto_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Automatically assign user for review

on:
pull_request:
types: [opened, ready_for_review]

jobs:
assign_users:
runs-on: ubuntu-latest
steps:
- name: Assign users
uses: kentaro-m/auto-assign-action@v2.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/auto_branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Automatically create branch on issue

on:
issues:
types: [opened, assigned]

jobs:
create_branch:
runs-on: ubuntu-latest
steps:
- name: Create issue branch
uses: robvanderleek/create-issue-branch@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading