forked from osmbe/osm-welcome-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
393 changed files
with
30,451 additions
and
19,451 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,34 @@ | ||
<VirtualHost *:80> | ||
# The ServerName directive sets the request scheme, hostname and port that | ||
# the server uses to identify itself. This is used when creating | ||
# redirection URLs. In the context of virtual hosts, the ServerName | ||
# specifies what hostname must appear in the request's Host: header to | ||
# match this virtual host. For the default virtual host (this file) this | ||
# value is not decisive as it is used as a last resort host regardless. | ||
# However, you must set it for any further virtual host explicitly. | ||
#ServerName www.example.com | ||
|
||
ServerAdmin webmaster@localhost | ||
DocumentRoot /var/www/app/public | ||
|
||
<Directory "/var/www/app/public"> | ||
Require all granted | ||
AllowOverride All | ||
</Directory> | ||
|
||
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | ||
# error, crit, alert, emerg. | ||
# It is also possible to configure the loglevel for particular | ||
# modules, e.g. | ||
#LogLevel info ssl:warn | ||
|
||
ErrorLog ${APACHE_LOG_DIR}/error.log | ||
CustomLog ${APACHE_LOG_DIR}/access.log combined | ||
|
||
# For most configuration files from conf-available/, which are | ||
# enabled or disabled at a global level, it is possible to | ||
# include a line for only one particular virtual host. For example the | ||
# following line enables the CGI configuration for this host only | ||
# after it has been globally disabled with "a2disconf". | ||
#Include conf-available/serve-cgi-bin.conf | ||
</VirtualHost> |
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,17 @@ | ||
#!/bin/sh | ||
|
||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" | ||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" | ||
|
||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] | ||
then | ||
>&2 echo 'ERROR: Invalid installer checksum' | ||
rm composer-setup.php | ||
exit 1 | ||
fi | ||
|
||
php composer-setup.php --quiet | ||
RESULT=$? | ||
rm composer-setup.php | ||
exit $RESULT |
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,4 @@ | ||
#!/bin/sh | ||
|
||
cd /var/www/osm-welcome-tool/ | ||
php bin/console welcome:update |
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,7 @@ | ||
.github/ | ||
docs/ | ||
node_modules/ | ||
public/build/ | ||
var/ | ||
vendor/ | ||
.env.* |
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
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
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,107 @@ | ||
name: PHP, Node.js, and Docker CI | ||
|
||
on: | ||
push: | ||
branches: [ 2.x ] | ||
pull_request: | ||
branches: [ 2.x ] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
php-check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-versions: [ '8.1', '8.2' ] # See https://www.php.net/supported-versions.php | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
- name: Cache Composer packages | ||
id: composer-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: vendor | ||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-php- | ||
- name: Install dependencies | ||
run: composer install --prefer-dist --no-progress | ||
- name: Run Composer check | ||
run: vendor/bin/grumphp run --testsuite=composer | ||
- name: Run checks | ||
run: vendor/bin/grumphp run --testsuite=check | ||
- name: Run test suite | ||
run: vendor/bin/phpunit | ||
|
||
node-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [ 16.x, 18.x ] # See https://nodejs.org/en/about/releases/ | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm ci | ||
- if: matrix.node-version != '18.x' | ||
run: npm run build | ||
- if: matrix.node-version == '18.x' | ||
run: NODE_OPTIONS=--openssl-legacy-provider npm run build | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: assets-${{ matrix.node-version }} | ||
path: public/build | ||
# - run: npm test | ||
|
||
node-eslint: | ||
runs-on: ubuntu-latest | ||
needs: node-build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: npm ci | ||
- run: npm run lint --if-present | ||
|
||
node-geojsonhint: | ||
runs-on: ubuntu-latest | ||
needs: node-build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: npm ci | ||
- run: npm run geojsonhint --if-present | ||
|
||
docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v3 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} |
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,20 @@ | ||
# Dependency Review Action | ||
# | ||
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging. | ||
# | ||
# Source repository: https://github.com/actions/dependency-review-action | ||
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v3 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.