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: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ root = true
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4

# Markdown
[*.{md,markdown}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2

Expand Down
21 changes: 16 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
COMPOSE_PROJECT_NAME='fluffevent-help'
IMAGES_PREFIX='fluffevent-help'

# Override these values with your own in `.env.local`:
# -- Override the values below with your own in `.env.local`.
# -- Leave values empty to use defaults.

# HTTP ports
HTTP_PORT='' # Exposed port
HTTP_DOCKER_PORT='' # Container port
# Docker ports configuration
# (host ports: "*_PORT"; container ports: "*_DOCKER_PORT")
HTTP_PORT=''
HTTP_DOCKER_PORT=''

# Application configuration
# Deployment configuration
GITHUB_REPOSITORY_URL=''
GITHUB_SHA=''
VERSION_TAG=''

# Astro configuration
ASTRO_SITE_URL=''
ASTRO_BASE_PATH=''
ASTRO_ASSETS_PREFIX=''

# Application configuration
# Add env vars for your application here.
1 change: 1 addition & 0 deletions .env.cli
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMPOSE_PROJECT_NAME='fluffevent-help-cli'
33 changes: 27 additions & 6 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
name: Check CI

# GitHub variables:
# - VERSION_TAG
# - ASTRO_SITE_URL
# - ASTRO_BASE_PATH
# - ASTRO_ASSETS_PREFIX

# GitHub secrets: N/A

on:

# Run on pull requests to primary branches
pull_request:
branches:
# Production
- main
# Staging
- staging
# Development
- dev
paths:
# CI files
# CI/CD files
- '.github/workflows/check.yml'
- 'docker-compose.yml'
- 'docker-compose.cicd.yml'
Expand All @@ -21,7 +31,7 @@ on:
# Run on manual triggers
workflow_dispatch:

# Set GITHUB_TOKEN permissions for the workflow
# Set default GITHUB_TOKEN permissions for the workflow
permissions:
contents: read

Expand All @@ -36,7 +46,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20

steps:

Expand Down Expand Up @@ -77,16 +87,27 @@ jobs:

- name: Build for production
env:
# Build configuration
BUILD_CHECK: 'true' # Run type checks
# Deployment configuration
GITHUB_REPOSITORY_URL: https://github.com/${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
BUILD_CHECK: "true" # Run type checks
VERSION_TAG: ${{ vars.VERSION_TAG }}
# Astro configuration
ASTRO_SITE_URL: ${{ vars.ASTRO_SITE_URL }}
ASTRO_BASE_PATH: ${{ vars.ASTRO_BASE_PATH }}
ASTRO_ASSETS_PREFIX: ${{ vars.ASTRO_ASSETS_PREFIX }}
# Application configuration
# Add env vars for your application here.
run: |
# docker compose build
echo '::group::Build details'
export DOCKER_UID="$(id -u)"
docker compose \
-f ./docker-compose.yml -f ./docker-compose.cicd.yml \
--env-file .env \
build
echo '::endgroup::'

- name: Copy application files
run: |
Expand All @@ -101,5 +122,5 @@ jobs:
run: |
# Check application files
[ -d ./app/dist ] && [ $(ls -1 ./app/dist | wc -l) -gt 0 ] \
&& echo "Application files found" \
|| ( echo "No application files found" && exit 1 )
&& echo 'Application files found' \
|| ( echo 'No application files found' && exit 1 )
31 changes: 25 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: Deploy CD

# GitHub variables:
# - VERSION_TAG
# - ASTRO_SITE_URL
# - ASTRO_BASE_PATH
# - ASTRO_ASSETS_PREFIX

# GitHub secrets: N/A

on:

# Run on push on production branches
Expand All @@ -8,7 +16,7 @@ on:
# Production
- main
paths:
# CI files
# CI/CD files
- '.github/workflows/deploy.yml'
- 'docker-compose.yml'
- 'docker-compose.cicd.yml'
Expand All @@ -19,7 +27,7 @@ on:
# Run on manual triggers
workflow_dispatch:

# Set GITHUB_TOKEN permissions for the workflow
# Set default GITHUB_TOKEN permissions for the workflow
permissions:
contents: read

Expand All @@ -34,11 +42,11 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20

steps:

# Steps dependencies
# Dependency steps

- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -75,9 +83,18 @@ jobs:

- name: Build for production
env:
# Build configuration
BUILD_CHECK: 'false' # Skip type checks
# Deployment configuration
GITHUB_REPOSITORY_URL: https://github.com/${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
BUILD_CHECK: "false" # Skip type checks
VERSION_TAG: ${{ vars.VERSION_TAG }}
# Astro configuration
ASTRO_SITE_URL: ${{ vars.ASTRO_SITE_URL }}
ASTRO_BASE_PATH: ${{ vars.ASTRO_BASE_PATH }}
ASTRO_ASSETS_PREFIX: ${{ vars.ASTRO_ASSETS_PREFIX }}
# Application configuration
# Add env vars for your application here.
run: |
# docker compose build
export DOCKER_UID="$(id -u)"
Expand Down Expand Up @@ -112,8 +129,8 @@ jobs:

# Set GITHUB_TOKEN permissions for the job
permissions:
pages: write
id-token: write
pages: write

# Set deployment environment
environment:
Expand All @@ -122,6 +139,8 @@ jobs:

steps:

# Execution steps

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -- Generic rules:

# Environment files
.env*.local
.env*.local*

# Temporary files
._*
Expand Down Expand Up @@ -41,6 +41,12 @@ dist/
.astro/
.vite/

# Playwright
test-results/
playwright-report/
blob-report/
playwright/.cache/

# Application environment files
*/**/.env*

Expand Down
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,34 @@
The help and documentation website for [Fluff Event](https://fluffEvent.fr).

Visit this website at [help.fluffEvent.fr](https://help.fluffEvent.fr).


## Getting started

### Development

Use this command to run the site locally for development:

```sh
docker compose watch
# or: docker compose up
```

Using `watch`, you'll benefit from file changes watching for sync & rebuild.

Use [DockerC](https://github.com/matiboux/dockerc) for shortened commands: `dockerc - @w`.

The site will be available at [http://localhost:8080](http://localhost:8080).

### Production

Use this command to run the site locally for production:

```sh
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
# or: docker compose -f docker-compose.yml up -d
```

Use [DockerC](https://github.com/matiboux/dockerc) for shortened commands: `dockerc prod`.

The site will be available at [http://localhost:8080](http://localhost:8080).
9 changes: 8 additions & 1 deletion app/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -- Generic rules:

# Environment files
.env*.local
.env*.local*

# Temporary files
._*
Expand Down Expand Up @@ -34,12 +34,19 @@ Thumbs.db

# Node.js
node_modules/
.pnpm-store/
dist/

# Astro
.astro/
.vite/

# Playwright
test-results/
playwright-report/
blob-report/
playwright/.cache/

# Application environment files
*/**/.env*

Expand Down
1 change: 1 addition & 0 deletions app/.starlight-template
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2b5292214e55efe3fd229b20efb2688c02ba6230
Loading