diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index dc51c01..0b2a030 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -3,6 +3,9 @@ require("@rushstack/eslint-patch/modern-module-resolution");
module.exports = {
root: true,
+ env: {
+ node: true,
+ },
extends: [
"plugin:vue/vue3-essential",
"eslint:recommended",
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 0000000..a06b080
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,27 @@
+name: Deploy FrontEnd
+
+on:
+ push:
+ branches: [ main ]
+
+jobs:
+ deploy-frontend:
+ runs-on: ubuntu-latest
+ steps:
+ - name: 🏗 Setup repo
+ uses: actions/checkout@v3
+
+ - name: 🏗 Setup node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16.x
+ cache: 'npm'
+
+ - name: 🏗 Install dependencies
+ run: npm ci
+
+ - name: 📦 Build app bundle
+ run: npm run build --if-present
+
+ - name: 📦 Deploy to netlify
+ run: netlify deploy --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} --site p2pix --prod
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..c7adafd
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,41 @@
+name: CI script
+
+on: push
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - name: 🏗 Setup repo
+ uses: actions/checkout@v3
+
+ - name: 🏗 Setup node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16.x
+ cache: 'npm'
+
+ - name: 🏗 Install dependencies
+ run: npm ci
+
+ - name: 📦 Lint with eslint
+ run: npm run lint
+
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: 🏗 Setup repo
+ uses: actions/checkout@v3
+
+ - name: 📦 Build docker image
+ run: |
+ docker build -t p2pix:$GITHUB_SHA .
+ docker save -o image_$GITHUB_SHA p2pix:$GITHUB_SHA
+
+ - name: 📦 Put docker image in cache
+ uses: actions/cache@v3
+ with:
+ key: p2pix
+ path: image_${{ github.sha }}
+
+ # test job
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..02ab85e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,10 @@
+FROM node:lts-alpine
+
+WORKDIR /app
+
+COPY package*.json ./
+RUN npm install
+COPY ./ ./
+
+EXPOSE 3000
+CMD ["npm", "run", "start"]
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..2c9234c
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 liftlearning
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..98a1783
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,11 @@
+version: '3.8'
+
+services:
+ p2pix:
+ container_name: p2pix_frontend
+ build:
+ context: .
+ volumes:
+ - '.:/app'
+ ports:
+ - '3000:3000'
\ No newline at end of file
diff --git a/package.json b/package.json
index 8490fb0..cb1e2d1 100644
--- a/package.json
+++ b/package.json
@@ -2,13 +2,14 @@
"name": "p2pix-front-end",
"version": "0.0.0",
"scripts": {
- "start": "vite",
+ "start": "vite --host=0.0.0.0 --port 3000",
"build": "run-p type-check build-only",
"preview": "vite preview",
"serve": "vue-cli-service serve",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit",
- "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
+ "lint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore --fix"
},
"dependencies": {
"@headlessui/vue": "^1.7.3",
diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue
index d5c0217..23a53cd 100644
--- a/src/views/HomeView.vue
+++ b/src/views/HomeView.vue
@@ -1,5 +1,5 @@