mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-09 15:05:35 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efcb1d0ef9 | ||
|
|
8b9e74bfe1 | ||
|
|
73752aed32 | ||
|
|
16a4ce1761 | ||
|
|
049feab0d8 |
@@ -4,7 +4,7 @@ build
|
||||
coverage
|
||||
.vscode
|
||||
.DS_STORE
|
||||
# .env
|
||||
.env
|
||||
tmp
|
||||
storage
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# node ace generate:key
|
||||
APP_KEY=UfdS996001I_koCN1OiZiSh-DJZTyvGc
|
||||
TZ=UTC
|
||||
PORT=3333
|
||||
HOST=localhost
|
||||
LOG_LEVEL=info
|
||||
APP_KEY=sLoJth45JD1vcS8n92Y2JUd8w3OL4HQb
|
||||
NODE_ENV=development
|
||||
SESSION_DRIVER=cookie
|
||||
DB_HOST=127.0.0.1
|
||||
|
||||
30
.github/workflows/cd.yml
vendored
30
.github/workflows/cd.yml
vendored
@@ -36,18 +36,18 @@ jobs:
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
|
||||
execute_commands_via_ssh:
|
||||
name: Pull latest docker image and start up the application with Docker Compose
|
||||
runs-on: ubuntu-latest
|
||||
needs: push_image_to_docker_hub
|
||||
steps:
|
||||
- name: Executing remote ssh commands
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
username: ${{ secrets.SSH_USERNAME }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
script: |
|
||||
cd /infra/my-links
|
||||
sh startup.sh
|
||||
# execute_commands_via_ssh:
|
||||
# name: Pull latest docker image and start up the application with Docker Compose
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: push_image_to_docker_hub
|
||||
# steps:
|
||||
# - name: Executing remote ssh commands
|
||||
# uses: appleboy/ssh-action@master
|
||||
# with:
|
||||
# host: ${{ secrets.SSH_HOST }}
|
||||
# port: ${{ secrets.SSH_PORT }}
|
||||
# username: ${{ secrets.SSH_USERNAME }}
|
||||
# key: ${{ secrets.SSH_KEY }}
|
||||
# script: |
|
||||
# cd /infra/my-links
|
||||
# sh startup.sh
|
||||
|
||||
26
Dockerfile
26
Dockerfile
@@ -1,27 +1,43 @@
|
||||
# Source : https://github.com/adonisjs-community/adonis-packages/blob/main/Dockerfile
|
||||
|
||||
FROM node:20-alpine3.18 as base
|
||||
FROM node:20-alpine3.18 AS base
|
||||
|
||||
RUN apk --no-cache add curl
|
||||
RUN corepack enable
|
||||
|
||||
# All deps stage
|
||||
FROM base as deps
|
||||
FROM base AS deps
|
||||
WORKDIR /app
|
||||
ADD package.json package-lock.json ./
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Production only deps stage
|
||||
FROM base as production-deps
|
||||
FROM base AS production-deps
|
||||
WORKDIR /app
|
||||
ADD package.json package-lock.json ./
|
||||
RUN npm install --omit="dev" --ignore-scripts
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# Build stage
|
||||
FROM base as build
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules /app/node_modules
|
||||
ADD . .
|
||||
|
||||
ENV PORT=3333
|
||||
ENV HOST=localhost
|
||||
ENV LOG_LEVEL=info
|
||||
ENV APP_KEY=sLoJth45JD1vcS8n92Y2JUd8w3OL4HQb
|
||||
ENV NODE_ENV=production
|
||||
ENV SESSION_DRIVER=cookie
|
||||
ENV DB_HOST=127.0.0.1
|
||||
ENV DB_PORT=5432
|
||||
ENV DB_USER=db_user
|
||||
ENV DB_PASSWORD=db_password
|
||||
ENV DB_DATABASE=db_db
|
||||
ENV GOOGLE_CLIENT_ID=client_id
|
||||
ENV GOOGLE_CLIENT_SECRET=client_secret
|
||||
ENV GOOGLE_CLIENT_CALLBACK_URL=http://localhost:3333/auth/callback
|
||||
|
||||
RUN node ace izzy:routes
|
||||
RUN node ace build
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ const shieldConfig = defineConfig({
|
||||
*/
|
||||
xFrame: {
|
||||
enabled: true,
|
||||
action: 'DENY',
|
||||
action: 'ALLOW-FROM',
|
||||
domain: '*',
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
21
package-lock.json
generated
21
package-lock.json
generated
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "my-links",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "my-links",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"license": "UNLICENSED",
|
||||
"dependencies": {
|
||||
"@adonisjs/ally": "^5.0.2",
|
||||
@@ -3539,15 +3540,6 @@
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/babel__generator": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/babel__template": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/babel__traverse": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/chai": {
|
||||
"version": "4.3.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz",
|
||||
@@ -3559,9 +3551,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
|
||||
"integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA=="
|
||||
},
|
||||
"node_modules/@types/istanbul-lib-report": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||
@@ -3593,7 +3582,6 @@
|
||||
"integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/prop-types": {},
|
||||
"node_modules/@types/react": {
|
||||
"version": "18.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.3.tgz",
|
||||
@@ -3650,9 +3638,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.10.tgz",
|
||||
"integrity": "sha512-e2PNXoXLr6Z+dbfx5zSh9TRlXJrELycxiaXznp4S5+D2M3b9bqJEitNHA5923jhnB2zzFiZHa2f0SI1HoIahpg=="
|
||||
},
|
||||
"node_modules/@types/yargs-parser": {
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "7.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.11.0.tgz",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-links",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.2",
|
||||
"type": "module",
|
||||
"license": "UNLICENSED",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user