Vite+Vueの無効化


📗Vite + Vue 3.0


ViteとVueを使用したプロジェクトの作成
npm init vite-app <project name>
を選択します.
npm install
npm run dev
命令語で実行を確認する

画面を確認して、実服にアップしましょう!

🐋Dockerfileを作成し、センターをアップロード

FROM node:slim

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . /app

CMD [ "npm", "run", "dev"]
Dockerfile
node_modules
package-lock.json
.dockerignoreファイルを作成すると、
docker build -t ililil9482/jayeon-vue:1.0 .
docker push ililil9482/jayeon-vue:1.0
枢軸に突き当たった.

変更Nginx

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    server {
        listen 80;
	    server_name jayeonapple.com;

        location / {
            proxy_pass http://jayeon:3000;
        }
    }
    
    server {
        listen 80;
	    server_name juno.jayeonapple.com;

        location / {
            proxy_pass http://portfolio:3000;
        }
    }

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    #include /etc/nginx/conf.d/*.conf;
}
nginx.confファイルの変更:
nginxイメージを再構築し、コンテナを閉じて再実行します.

🤵‍♂️jenkins設定の変更

pipeline {
    agent any

    stages {
        stage('Down') {
            steps {
sshPublisher(publishers: [
  sshPublisherDesc(configName: 'aws',
  transfers: [
    sshTransfer(cleanRemote: false,
    excludes: '',
    execCommand: 'cd /project/jayeon && sudo docker-compose down',
    execTimeout: 120000,
    flatten: false,
    makeEmptyDirs: false,
    noDefaultExcludes: false,
    patternSeparator: '[, ]+',
    remoteDirectory: '',
    remoteDirectorySDF: false,
    removePrefix: '',
    sourceFiles: '')
  ],
  usePromotionTimestamp: false,
  useWorkspaceInPromotion: false,
  verbose: false)
])
            }
        }

        stage('Pull') {
            steps {
sshPublisher(publishers: [
  sshPublisherDesc(configName: 'aws',
  transfers: [
    sshTransfer(cleanRemote: false,
    excludes: '',
    execCommand: 'sudo docker pull ililil9482/jayeon-vue:1.0',
    execTimeout: 120000,
    flatten: false,
    makeEmptyDirs: false,
    noDefaultExcludes: false,
    patternSeparator: '[, ]+',
    remoteDirectory: '',
    remoteDirectorySDF: false,
    removePrefix: '',
    sourceFiles: '')
  ],
  usePromotionTimestamp: false,
  useWorkspaceInPromotion: false,
  verbose: false)
])
            }
        }

        stage('Up') {
            steps {
sshPublisher(publishers: [
  sshPublisherDesc(configName: 'aws',
  transfers: [
    sshTransfer(cleanRemote: false,
    excludes: '',
    execCommand: 'cd /project/jayeon && sudo docker-compose up -d',
    execTimeout: 120000,
    flatten: false,
    makeEmptyDirs: false,
    noDefaultExcludes: false,
    patternSeparator: '[, ]+',
    remoteDirectory: '',
    remoteDirectorySDF: false,
    removePrefix: '',
    sourceFiles: '')
  ],
  usePromotionTimestamp: false,
  useWorkspaceInPromotion: false,
  verbose: false)
])
            }
        }
        
        
    }
}
http://jayeonapple.com/

http://juno.jayeonapple.com/

みんな接続を確認しました.