Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alex/v3.1 #697

Merged
merged 18 commits into from
Feb 12, 2025
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
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install Dependencies
run: yarn install --immutable
run: npm ci

- name: Build Project
run: yarn build
run: npm rebuild && npm run build

- name: Prepare artifact
run: |
Expand Down Expand Up @@ -75,10 +74,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable
run: npm ci

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable
run: npm ci

- name: Lint
uses: wearerequired/lint-action@v2.3.0
Expand All @@ -42,10 +41,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
run: yarn install --immutable
run: npm ci

- name: Build
run: yarn build
run: npm rebuild && npm run build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,4 +132,3 @@ static/fonts/
!.yarn/versions
.pnp.*
node_modules
package-lock.json
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.4.0
22.13.1
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:23

WORKDIR /app

RUN apt-get update && apt-get install -y \
libvips \
git \
&& rm -rf /var/lib/apt/lists/*

COPY . .

RUN npm ci

RUN npm rebuild && npm run build

RUN mkdir -p /app/geoip \
&& curl -L -o /app/geoip/GeoLite2-City.mmdb "https://raw.githubusercontent.com/P3TERX/GeoLite.mmdb/download/GeoLite2-City.mmdb" \
&& curl -L -o /app/geoip/GeoLite2-ASN.mmdb "https://raw.githubusercontent.com/P3TERX/GeoLite.mmdb/download/GeoLite2-ASN.mmdb" \
&& curl -L -o /app/geoip/GeoLite2-Country.mmdb "https://raw.githubusercontent.com/P3TERX/GeoLite.mmdb/download/GeoLite2-Country.mmdb"

ENV FRAPI_GEOIP_DIRECTORY=/app/geoip

EXPOSE 8080

CMD ["node", "--enable-source-maps", "dist/index.mjs"]
32 changes: 21 additions & 11 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"presets": [
["@babel/preset-env", {
"targets": {
"node": "16.4"
},
"shippedProposals": true
}]
[
"@babel/preset-env",
{
"targets": {
"node": "16.4"
},
"shippedProposals": true
}
]
],
"env": {
"development": {
Expand All @@ -19,14 +22,21 @@
"setPublicClassFields": true
},
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
["@babel/plugin-proposal-class-properties"],
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
[
"@babel/plugin-transform-class-properties"
],
"@babel/plugin-proposal-function-bind",
"@babel/plugin-proposal-optional-catch-binding",
"@babel/plugin-transform-optional-catch-binding",
"@babel/plugin-transform-strict-mode",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-transform-numeric-separator",
"@babel/plugin-transform-logical-assignment-operators",
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-default-from"
]
Expand Down
48 changes: 48 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
version: '3.8'
services:
db:
image: postgres:15
restart: always
environment:
POSTGRES_USER: fuelrats
POSTGRES_PASSWORD: squeak
POSTGRES_DB: fuelrats
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "5432:5432"

app:
build: .
restart: always
depends_on:
- db
environment:
NODE_ENV: development
FRAPI_HOSTNAME: 0.0.0.0
FRAPI_PORT: 8080
FRAPI_URL: http://localhost:8080
FRAPI_COOKIE: ${FRAPI_COOKIE}
FRAPI_FRONTEND_CLIENTID: ${FRAPI_FRONTEND_CLIENTID}
FRAPI_FRONTEND_URL: ${FRAPI_FRONTEND_URL}
FRAPI_POSTGRES_DATABASE: fuelrats
FRAPI_POSTGRES_USERNAME: fuelrats
FRAPI_POSTGRES_HOSTNAME: db
FRAPI_POSTGRES_PASSWORD: squeak

FRAPI_JIRA_URL: ${FRAPI_JIRA_URL}
FRAPI_JIRA_USERNAME: ${FRAPI_JIRA_USERNAME}
FRAPI_JIRA_PASSWORD: ${FRAPI_JIRA_PASSWORD}

FRAPI_ANOPE_DATABASE: ${FRAPI_ANOPE_DATABASE}
FRAPI_ANOPE_HOSTNAME: ${FRAPI_ANOPE_HOSTNAME}
FRAPI_ANOPE_PORT: ${FRAPI_ANOPE_PORT}
FRAPI_ANOPE_USERNAME: ${FRAPI_ANOPE_USERNAME}
FRAPI_ANOPE_PASSWORD: ${FRAPI_ANOPE_PASSWORD}
FRAPI_ANOPE_XMLRPC: ${FRAPI_ANOPE_XMLRPC}

ports:
- "8080:8080"

volumes:
pgdata:
Loading