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
43 changes: 43 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Deploy (Development)

on:
pull_request:
branches: [ release ]

workflow_dispatch:

jobs:
dev:
environment: dev
runs-on: ubuntu-latest
permissions:
id-token: write # This is required for requesting the OIDC JWT Token
contents: read # Required when GH token is used to authenticate with private repo

steps:
- name: Checkout to the branch
uses: actions/checkout@v2

- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

# TODO: add test step

- name: Build and Deploy
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
dockerfilePath: ./Dockerfile
registryUrl: plurish.azurecr.io
registryUsername: ${{ secrets.REGISTRY_USERNAME }}
registryPassword: ${{ secrets.REGISTRY_PASSWORD }}
containerAppName: dev-capp-plurish-web
resourceGroup: dev-rg-plurish
imageToBuild: plurish.azurecr.io/ui:${{ github.sha }}
targetPort: 8000
_buildArgumentsKey_: |
_buildArgumentsValues_

# TODO: add hml stage
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
"name": "Start",
"request": "launch",
"preLaunchTask": "compose-up",
"type": "node"
"type": "node"
},
{
{
"name": "Stop",
"request": "launch",
"preLaunchTask": "compose-down",
"type": "node"
"type": "node"
},
],
"compounds": [
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM plurish/server:latest

ENV APP_ENV=prod

RUN apt-get install -y --no-install-recommends vim & \
npm i -g yarn & \
pecl install xdebug && docker-php-ext-enable xdebug
npm i -g yarn

WORKDIR /var/www

Expand All @@ -13,10 +14,10 @@ RUN chmod 777 /var/www /var/www/yarn.lock /var/www/public
USER dev

# Installing dependencies
RUN composer install & yarn
RUN composer clear-cache & yarn cache clean
RUN composer install --no-dev --optimize-autoloader & yarn
RUN yarn build

# Starting the app
COPY ./xdebug.ini "${PHP_INI_DIR}/conf.d"
EXPOSE 8000

CMD ["bash", "./init.sh"]
ENTRYPOINT ["symfony", "server:start"]
22 changes: 22 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM plurish/server:latest

RUN apt-get install -y --no-install-recommends vim & \
npm i -g yarn & \
pecl install xdebug && docker-php-ext-enable xdebug

WORKDIR /var/www

COPY ./ ./

RUN chmod 777 /var/www /var/www/yarn.lock /var/www/public

USER dev

# Installing dependencies
RUN composer install & yarn
RUN composer clear-cache & yarn cache clean

# Starting the app
COPY ./xdebug.ini "${PHP_INI_DIR}/conf.d"

CMD ["bash", "./init.sh"]
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
image: plurish/ui:dev
build:
context: ./
dockerfile: Dockerfile
dockerfile: Dockerfile.dev
extra_hosts:
- host.docker.internal:host-gateway
restart: unless-stopped
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/preset-env": "^7.16.0",
"@symfony/webpack-encore": "^4.0.0",
"autoprefixer": "^10.4.16",
"core-js": "^3.23.0",
"postcss-loader": "^7.3.3",
Expand Down Expand Up @@ -33,6 +32,7 @@
"vue": "^3.3.8",
"vue-loader": "17.0.0",
"vuetify": "^3.4.0",
"@symfony/webpack-encore": "^4.0.0",
"webpack-plugin-vuetify": "^2.0.1"
}
}
4 changes: 4 additions & 0 deletions resources/app.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">

<style>
#app { overflow-x: hidden !important; }
</style>

{{ inertiaHead(page) }}

{% block stylesheets %}
Expand Down
4 changes: 4 additions & 0 deletions resources/views/Auth/SignIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export default defineComponent({
},
}),

mounted() {
window.scrollTo(0, 0);
},

methods: {
async signin(event: SubmitEventPromise) {
const error = {
Expand Down
4 changes: 4 additions & 0 deletions resources/views/Auth/SignUp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ export default defineComponent({
},
},

mounted() {
window.scrollTo(0, 0);
},

methods: {
async signup(event: SubmitEventPromise) {
const error = {
Expand Down
Loading