Skip to content

Commit

Permalink
Merge tag 'v1.0.0' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
jobara committed Jul 10, 2023
2 parents 437474c + 1111151 commit 623b43e
Show file tree
Hide file tree
Showing 358 changed files with 5,610 additions and 7,535 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.1]
php: [8.1, 8.2]

name: tests - PHP ${{ matrix.php }}

Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
php artisan storage:link
php artisan test --parallel --coverage-clover coverage.xml
- name: Upload coverage to Codecov
if: steps.git-diff.outputs.diff
if: steps.git-diff.outputs.diff && matrix.php == '8.1'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/mirror-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Mirror dev to GitLab

on:
push:
branches:
- dev

jobs:
mirror:
if: github.repository == 'accessibility-exchange/platform'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Git
run: |
git config --global user.name "${{ vars.GIT_USER }}"
git config --global user.email "${{ vars.GIT_EMAIL }}"
git remote add gitlab ${{ vars.GITLAB_URL }}
- name: Setup SSH
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}

- name: Push to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git push gitlab dev:development
33 changes: 33 additions & 0 deletions .github/workflows/mirror-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Mirror production to GitLab

on:
push:
branches:
- production

jobs:
mirror:
if: github.repository == 'accessibility-exchange/platform'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Git
run: |
git config --global user.name "${{ vars.GIT_USER }}"
git config --global user.email "${{ vars.GIT_EMAIL }}"
git remote add gitlab ${{ vars.GITLAB_URL }}
- name: Setup SSH
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}

- name: Push to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git push gitlab production:production
33 changes: 33 additions & 0 deletions .github/workflows/mirror-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Mirror staging to GitLab

on:
push:
branches:
- staging

jobs:
mirror:
if: github.repository == 'accessibility-exchange/platform'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Git
run: |
git config --global user.name "${{ vars.GIT_USER }}"
git config --global user.email "${{ vars.GIT_EMAIL }}"
git remote add gitlab ${{ vars.GITLAB_URL }}
- name: Setup SSH
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}

- name: Push to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git push gitlab staging:staging
33 changes: 33 additions & 0 deletions .github/workflows/mirror-tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Mirror tags to GitLab

on:
push:
tags:
- '*'

jobs:
mirror:
if: github.repository == 'accessibility-exchange/platform'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Git
run: |
git config --global user.name "${{ vars.GIT_USER }}"
git config --global user.email "${{ vars.GIT_EMAIL }}"
git remote add gitlab ${{ vars.GITLAB_URL }}
- name: Setup SSH
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.GITLAB_SSH_KEY }}

- name: Push tags to GitLab
run: |
ssh-keyscan git.kube.v1.colab.coop >> ~/.ssh/known_hosts
git push gitlab --tags
16 changes: 10 additions & 6 deletions .kube/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FROM php:8.1-fpm

ENV PHP_VERSION 8.1
ENV NODE_VERSION 16
ENV NVM_VERSION 0.39.3
ENV NVM_DIR /root/.nvm

ENV APP_DIR /app
ENV KUBE_DIR .kube/app

Expand Down Expand Up @@ -47,12 +52,11 @@ RUN pecl install -o -f redis && \

COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

ENV NODE_VERSION 16
RUN curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
&& apt install -y nodejs \
&& npm install -g npm
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" && nvm install $NODE_VERSION
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH

COPY $KUBE_DIR/php.ini /etc/php/8.1/cli/conf.d/99-sail.ini
COPY $KUBE_DIR/php.ini /etc/php/$PHP_VERSION/cli/conf.d/99-sail.ini
COPY $KUBE_DIR/nginx.conf /etc/nginx/nginx.conf
COPY $KUBE_DIR/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

Expand All @@ -62,7 +66,7 @@ COPY . $APP_DIR

RUN composer install

RUN npm install
RUN . "$NVM_DIR/nvm.sh" && nvm use $NODE_VERSION && npm ci

RUN chown www-data:root $APP_DIR/public/ -R

Expand Down
2 changes: 1 addition & 1 deletion .kube/app/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mkdir -p $FILES_PATH
# mkdir -p $CACHE_PATH removed per https://github.com/accessibility-exchange/platform/issues/1596

## fix permissions before syncing to existing storage and cache https://github.com/accessibility-exchange/platform/issues/1226
chown -R www-data:root /app/storage /app/bootstrap/cache $FILES_PATH # $CACHE_PATH removed per https://github.com/accessibility-exchange/platform/issues/1596
chown -R www-data:root /app/storage /app/bootstrap/cache $FILES_PATH $VIEW_COMPILED_PATH # $CACHE_PATH removed per https://github.com/accessibility-exchange/platform/issues/1596

## sync files from container storage to permanent storage then remove container storage
rsync -a /app/storage/ $FILES_PATH
Expand Down
2 changes: 2 additions & 0 deletions .kube/app/values.development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ env:
SESSION_LIFETIME: "120"
SAIL_XDEBUG_MODE: "develop,debug,coverage"
FILES_PATH: "/opt/data/storage"
VIEW_COMPILED_PATH: "/app/bootstrap/views"

# CACHE_PATH: "/opt/data/cache" removed per https://github.com/accessibility-exchange/platform/issues/1596
### Place those values in Vault
# secrets:
Expand Down
1 change: 1 addition & 0 deletions .kube/app/values.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
SESSION_LIFETIME: "120"
SAIL_XDEBUG_MODE: "develop,debug,coverage"
FILES_PATH: "/opt/data/storage"
VIEW_COMPILED_PATH: "/app/bootstrap/views"
# CACHE_PATH: "/opt/data/cache" removed per https://github.com/accessibility-exchange/platform/issues/1596
### Place those values in Vault
# secrets:
Expand Down
1 change: 1 addition & 0 deletions .kube/app/values.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
SESSION_LIFETIME: "120"
SAIL_XDEBUG_MODE: "develop,debug,coverage"
FILES_PATH: "/opt/data/storage"
VIEW_COMPILED_PATH: "/app/bootstrap/views"
# CACHE_PATH: "/opt/data/cache" removed per https://github.com/accessibility-exchange/platform/issues/1596
### Place those values in Vault
# secrets:
Expand Down
87 changes: 87 additions & 0 deletions .kube/db/values.development.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
primary:
configuration: |-
[mysqld]
basedir=/opt/bitnami/mysql
bind-address=0.0.0.0
character-set-server=UTF8
collation-server=utf8_general_ci
datadir=/bitnami/mysql/data
default_authentication_plugin=mysql_native_password
explicit_defaults_for_timestamp
innodb_buffer_pool_size=1G
innodb_doublewrite=1
innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout=100
innodb_log_buffer_size=16M
innodb_max_dirty_pages_pct=80
innodb_thread_concurrency=0
log-error=/opt/bitnami/mysql/logs/mysqld.log
long_query_time=20.0
max_allowed_packet=16M
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
skip-name-resolve
slow_query_log=1
slow_query_log_file=/opt/bitnami/mysql/logs/mysqld.log
socket=/opt/bitnami/mysql/tmp/mysql.sock
table_definition_cache=2048
table_open_cache=512
tmpdir=/opt/bitnami/mysql/tmp
[client]
default-character-set=UTF8
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
[manager]
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
secondary:
configuration: |-
[mysqld]
basedir=/opt/bitnami/mysql
bind-address=0.0.0.0
character-set-server=UTF8
collation-server=utf8_general_ci
datadir=/bitnami/mysql/data
default_authentication_plugin=mysql_native_password
explicit_defaults_for_timestamp
innodb_buffer_pool_size=1G
innodb_doublewrite=1
innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout=100
innodb_log_buffer_size=16M
innodb_max_dirty_pages_pct=80
innodb_thread_concurrency=0
log-error=/opt/bitnami/mysql/logs/mysqld.log
long_query_time=20.0
max_allowed_packet=16M
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
skip-name-resolve
slow_query_log=1
slow_query_log_file=/opt/bitnami/mysql/logs/mysqld.log
socket=/opt/bitnami/mysql/tmp/mysql.sock
table_definition_cache=2048
table_open_cache=512
tmpdir=/opt/bitnami/mysql/tmp
[client]
default-character-set=UTF8
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
[manager]
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
### Place those values in Vault
# auth:
# database: ""
# username: ""
# password: ""
# rootPassword: ""
# replicationPassword: ""
39 changes: 39 additions & 0 deletions .kube/db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,45 @@ primary:
secondary:
persistence:
size: 10Gi
configuration: |-
[mysqld]
basedir=/opt/bitnami/mysql
bind-address=0.0.0.0
character-set-server=UTF8
collation-server=utf8_general_ci
datadir=/bitnami/mysql/data
default_authentication_plugin=mysql_native_password
explicit_defaults_for_timestamp
innodb_buffer_pool_size=1G
innodb_doublewrite=1
innodb_flush_log_at_trx_commit=1
innodb_flush_method=O_DIRECT
innodb_lock_wait_timeout=50
innodb_log_buffer_size=16M
innodb_max_dirty_pages_pct=80
innodb_thread_concurrency=0
log-error=/opt/bitnami/mysql/logs/mysqld.log
long_query_time=10.0
max_allowed_packet=16M
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
skip-name-resolve
slow_query_log=0
slow_query_log_file=/opt/bitnami/mysql/logs/mysqld.log
socket=/opt/bitnami/mysql/tmp/mysql.sock
table_definition_cache=2048
table_open_cache=512
tmpdir=/opt/bitnami/mysql/tmp
[client]
default-character-set=UTF8
plugin_dir=/opt/bitnami/mysql/lib/plugin
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
[manager]
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
### Place those values in Vault
# auth:
# database: ""
Expand Down
Loading

0 comments on commit 623b43e

Please sign in to comment.