Skip to content

Commit 1739bf0

Browse files
committed
PUSH
-> Fix typescript :) -> Added more workflows -> Braindead
1 parent f7d4af4 commit 1739bf0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3958
-4109
lines changed

.github/workflows/backend.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
lint:
10+
name: Backend Lint
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: backend
15+
steps:
16+
17+
- name: Code Checkout
18+
uses: actions/checkout@v4
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: "8.3"
23+
extensions: bcmath, curl, gd, mbstring, mysql, openssl, pdo, tokenizer, xml, zip
24+
tools: composer:v2
25+
coverage: none
26+
- name: Install dependencies
27+
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist
28+
- name: Lint
29+
run: composer lint

.github/workflows/frontend.yml

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
name: Node.js CI
1+
name: Frontend Jobs
22

33
on: [push, pull_request]
44
jobs:
55
build:
66
name: Frontend Build
77
runs-on: ubuntu-latest
8-
98
permissions:
109
contents: read
11-
1210
strategy:
1311
fail-fast: false
1412
matrix:
1513
node-version: [20]
16-
1714
defaults:
1815
run:
1916
working-directory: frontend
20-
2117
steps:
2218
- name: Code Checkout
2319
uses: actions/checkout@v4
@@ -34,4 +30,62 @@ jobs:
3430
exit 1
3531
fi
3632
- name: Build
37-
run: yarn build
33+
run: yarn build
34+
lint:
35+
name: Frontend Lint
36+
runs-on: ubuntu-latest
37+
permissions:
38+
contents: read
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
node-version: [20]
43+
defaults:
44+
run:
45+
working-directory: frontend
46+
steps:
47+
- name: Code Checkout
48+
uses: actions/checkout@v4
49+
- name: Use Node.js ${{ matrix.node-version }}
50+
uses: actions/setup-node@v2
51+
with:
52+
node-version: ${{ matrix.node-version }}
53+
- name: Install dependencies
54+
run: |
55+
if [ -f yarn.lock ]; then
56+
yarn install --frozen-lockfile
57+
else
58+
echo "yarn.lock file not found"
59+
exit 1
60+
fi
61+
- name: Lint
62+
run: yarn lint
63+
format:
64+
name: Frontend Format
65+
runs-on: ubuntu-latest
66+
permissions:
67+
contents: read
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
node-version: [20]
72+
defaults:
73+
run:
74+
working-directory: frontend
75+
steps:
76+
- name: Code Checkout
77+
uses: actions/checkout@v4
78+
- name: Use Node.js ${{ matrix.node-version }}
79+
uses: actions/setup-node@v2
80+
with:
81+
node-version: ${{ matrix.node-version }}
82+
- name: Install dependencies
83+
run: |
84+
if [ -f yarn.lock ]; then
85+
yarn install --frozen-lockfile
86+
else
87+
echo "yarn.lock file not found"
88+
exit 1
89+
fi
90+
- name: Format
91+
run: yarn format

backend/storage/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DATABASE_HOST=127.0.0.1
22
DATABASE_PORT=3306
33
DATABASE_USER=mythical
4-
DATABASE_PASSWORD=
4+
DATABASE_PASSWORD=efwefwefwe
55
DATABASE_DATABASE=mythicalclient
66
DATABASE_ENCRYPTION=xchacha20
7-
DATABASE_ENCRYPTION_KEY=zKZ7//AocUD2wCuzjW5rdTbb8FvGBgKTZ8iCATslZ/8=
7+
DATABASE_ENCRYPTION_KEY="zKZ7//AocUD2wCuzjW5rdTbb8FvGBgKTZ8iCATslZ/8="

docker-compose.yml

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
services:
2+
php:
3+
build:
4+
context: ./dockerfiles/php
5+
restart: unless-stopped
6+
volumes:
7+
- .:/var/www/
8+
expose:
9+
- 9000
10+
depends_on:
11+
database:
12+
condition: service_healthy
13+
env_file: ./backend/storage/.env
14+
extra_hosts:
15+
host.docker.internal: host-gateway
16+
17+
frontend:
18+
build:
19+
context: ./dockerfiles/frontend
20+
restart: unless-stopped
21+
22+
composer:
23+
image: composer:latest
24+
working_dir: /var/www
25+
volumes:
26+
- .:/var/www
27+
entrypoint: ["composer", "--ignore-platform-reqs", "--no-progress", "--no-dev", "--optimize-autoloader"]
28+
command: ["install"]
29+
230
database:
3-
image: mariadb:latest
4-
restarted: unless-stopped
31+
image: mariadb:10.5
32+
restart: unless-stopped
533
volumes:
6-
- ./dockerfiles/mysql/data
34+
- ./dockerfiles/mariadb/data:/var/lib/mysql
35+
ports:
36+
- 3306:3306
37+
env_file:
38+
- ./backend/storage/.env
39+
environment:
40+
- MARIADB_RANDOM_ROOT_PASSWORD: "true"
41+
- MARIADB_DATABASE: ${DATABASE_DATABASE}
42+
- MARIADB_USER: ${DATABASE_USER}
43+
- MARIADB_PASSWORD: ${DATABASE_PASSWORD}

dockerfiles/frontend/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM node:20-alpine
2+
3+
RUN npm i
4+
RUN npm run build
5+
6+
WORKDIR /var/www/frontend

dockerfiles/mariadb/.gitignore

Whitespace-only changes.

dockerfiles/php/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM php:8.3-fpm
2+
3+
RUN apt -y install php8.3-{common,cli,gd,mysql,mbstring,bcmath,xml,fpm,curl,zip,pdo}
4+
5+
WORKDIR /var/www/backend
6+
7+
CMD ["php-fpm"]

frontend/.prettierrc.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
21
{
3-
"$schema": "https://json.schemastore.org/prettierrc",
4-
"semi": false,
2+
"printWidth": 120,
3+
"tabWidth": 4,
4+
"useTabs": false,
5+
"semi": true,
56
"singleQuote": true,
6-
"printWidth": 100
7-
}
7+
"jsxSingleQuote": true,
8+
"endOfLine": "lf"
9+
}

frontend/eslint.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ export default [
1010

1111
{
1212
name: 'app/files-to-ignore',
13-
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
13+
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', 'env.d.ts'],
1414
},
1515

1616
...pluginVue.configs['flat/essential'],
1717
...vueTsEslintConfig(),
1818
skipFormatting,
19+
{
20+
rules: {
21+
'vue/multi-word-component-names': 'off',
22+
},
23+
},
1924
]

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
7+
"dev": "vite --host",
88
"build": "run-p type-check \"build-only {@}\" --",
99
"preview": "vite preview",
1010
"build-only": "vite build",

0 commit comments

Comments
 (0)