-
-
Notifications
You must be signed in to change notification settings - Fork 55
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 #43 from adonisjs-community/feat/new-website
New website
- Loading branch information
Showing
292 changed files
with
9,941 additions
and
8,893 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,9 @@ | ||
TZ=UTC | ||
PORT=3333 | ||
HOST=0.0.0.0 | ||
LOG_LEVEL=info | ||
APP_KEY= | ||
NODE_ENV=development | ||
SESSION_DRIVER=cookie | ||
GITHUB_TOKEN= | ||
CACHE_STORE=cache |
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 @@ | ||
NODE_ENV=test | ||
CACHE_STORE=test | ||
|
||
TZ=UTC | ||
PORT=3333 | ||
HOST=0.0.0.0 | ||
LOG_LEVEL=info | ||
APP_KEY=25St7k_qqnrC1z5tKGuhiUG0H1oH8A7q | ||
SESSION_DRIVER=memory | ||
|
||
GITHUB_TOKEN=xxx |
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 @@ | ||
github: [Julien-R44] |
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,26 @@ | ||
--- | ||
ignoreUnless: {{ STALE_BOT }} | ||
--- | ||
# Configuration for Lock Threads - https://github.com/dessant/lock-threads-app | ||
|
||
# Number of days of inactivity before a closed issue or pull request is locked | ||
daysUntilLock: 60 | ||
|
||
# Skip issues and pull requests created before a given timestamp. Timestamp must | ||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable | ||
skipCreatedBefore: false | ||
|
||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable | ||
exemptLabels: ['Type: Security'] | ||
|
||
# Label to add before locking, such as `outdated`. Set to `false` to disable | ||
lockLabel: false | ||
|
||
# Comment to post before locking. Set to `false` to disable | ||
lockComment: > | ||
This thread has been automatically locked since there has not been | ||
any recent activity after it was closed. Please open a new issue for | ||
related bugs. | ||
# Assign `resolved` as the reason for locking. Set to `false` to disable | ||
setLockReason: false |
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,24 @@ | ||
--- | ||
ignoreUnless: {{ STALE_BOT }} | ||
--- | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 60 | ||
|
||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
|
||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- 'Type: Security' | ||
|
||
# Label to use when marking an issue as stale | ||
staleLabel: 'Status: Abandoned' | ||
|
||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
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,66 @@ | ||
name: Checks | ||
|
||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
#### Lint job | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21 | ||
- name: Install pnpm | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Lint | ||
run: pnpm lint | ||
|
||
#### Typecheck job | ||
typecheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21 | ||
- name: Install pnpm | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Typecheck | ||
run: pnpm typecheck | ||
|
||
#### Test job | ||
tests: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 21 | ||
- name: Install pnpm | ||
run: | | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
- name: Install | ||
run: pnpm install | ||
- name: Install Playwright Browsers | ||
run: pnpm playwright install --with-deps | ||
- name: Test | ||
# `|| true`` is necessary for now. It's looks like a bug : lucid seems to always throws an error when exiting | ||
run: FORCE_COLOR=1 NODE_ENV=test pnpm test || true | ||
|
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,71 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
#### Checks jobs / Lint, typecheck, test | ||
checks: | ||
name: Checks | ||
uses: ./.github/workflows/checks.yml | ||
secrets: inherit | ||
|
||
#### Build and push image | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
needs: checks | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to GitHub Packages | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Prepare metadata | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: ghcr.io/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=ref,event=tag | ||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
build-args: | | ||
APP_RELEASE=${{ github.sha }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Deploy the new image | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USER }} | ||
key: ${{ secrets.KEY }} | ||
script: | | ||
cd ~/stacks | ||
docker stack deploy -c package.yml package --with-registry-auth |
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,16 +1,26 @@ | ||
# Dependencies and AdonisJS build | ||
node_modules | ||
*.log* | ||
dist | ||
.DS_Store | ||
.vercel | ||
.nuxt | ||
sw.js | ||
build | ||
tmp | ||
|
||
# Secrets | ||
.env | ||
.vscode | ||
cache | ||
.vercel_build_output | ||
.output | ||
package-lock.json | ||
npm/modules.json | ||
.env.local | ||
.env.production.local | ||
.env.development.local | ||
.env.prod | ||
|
||
# Frontend assets compiled code | ||
public/assets | ||
|
||
# Build tools specific | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Editors specific | ||
.fleet | ||
.idea | ||
.tool-versions | ||
|
||
# Platform specific | ||
.DS_Store | ||
.todo |
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,5 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"adonisjs.inertia.pagesDirectory": "resources/pages", | ||
"eslint.experimental.useFlatConfig": true | ||
} |
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,36 @@ | ||
FROM node:20-alpine3.18 as base | ||
|
||
RUN apk --no-cache add curl | ||
RUN corepack enable | ||
|
||
# All deps stage | ||
FROM base as deps | ||
WORKDIR /app | ||
ADD package.json pnpm-lock.yaml ./ | ||
RUN pnpm install | ||
|
||
# Production only deps stage | ||
FROM base as production-deps | ||
WORKDIR /app | ||
ADD package.json pnpm-lock.yaml ./ | ||
RUN pnpm install --prod | ||
RUN wget https://gobinaries.com/tj/node-prune --output-document - | /bin/sh && node-prune | ||
|
||
# Build stage | ||
FROM base as build | ||
WORKDIR /app | ||
COPY --from=deps /app/node_modules /app/node_modules | ||
ADD . . | ||
RUN node ace build --ignore-ts-errors --package-manager=pnpm | ||
RUN node ace build:packages | ||
|
||
# Production stage | ||
FROM base | ||
ENV NODE_ENV=production | ||
WORKDIR /app | ||
COPY --from=production-deps /app/node_modules /app/node_modules | ||
COPY --from=build /app/build /app | ||
COPY --from=build /app/content/build/packages.json /app/content/build/packages.json | ||
RUN mkdir /app/tmp | ||
EXPOSE 8080 | ||
CMD ["node", "./bin/server.js"] |
Oops, something went wrong.