idobata-analyst
2025-03-16 初期設定&firsrt impressiontakker.icon
環境変数の設定
code:sh
# ルートディレクトリ
cp .env.example .env
# バックエンド
cp packages/backend/.env.example packages/backend/.env
# フロントエンド
cp packages/frontend/.env.example packages/frontend/.env
これは自動でコピーするshell scriptを用意してもいいと思った
起動
今入れる
いや、Docker Desktopはいるのか?
GUIを動かすだけだし
17:37:11 なんかでた
code:warning
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.)
debconf: falling back to frontend: Readline
Selecting previously unselected package apt-transport-https.
いったん無視するか
いや、これと同じのがあと2回出現してる
直すか
17:39:12 こんなのも出た
code:warning2
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
containerd.io:amd64 : Depends: libc6:amd64 (>= 2.38) but it is not installable
Depends: libseccomp2:amd64 (>= 2.5.0) but it is not installable
docker-ce:amd64 : Depends: libc6:amd64 (>= 2.34) but it is not installable
Depends: libsystemd0:amd64 but it is not installable
Recommends: apparmor:amd64 but it is not installable
Recommends: docker-ce-rootless-extras:amd64 but it is not going to be installed
Recommends: libltdl7:amd64 but it is not installable
Recommends: pigz:amd64 but it is not installable
docker-ce-cli:amd64 : Depends: libc6:amd64 (>= 2.34) but it is not installable
Recommends: docker-buildx-plugin:amd64 but it is not going to be installed
Recommends: docker-compose-plugin:amd64 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
17:42:23 いろいろ不穏な警告は出たが、Docker拡張機能はとりあえず動いてるみたい
code:log
Creating network "idobata-analyst_default" with the default driver
Creating volume "idobata-analyst_mongodb_data" with default driver
Pulling mongodb (mongo:latest)...
latest: Pulling from library/mongo
5b17151e9710: Pull complete
db36a6fa5a5c: Pull complete
760f9fca2772: Pull complete
bf53cef41591: Pull complete
9db051dd9fea: Pull complete
d4279f66f03d: Pull complete
11b6129e2295: Pull complete
37b75310b0db: Pull complete
Digest: sha256:7bd28e5eea1c5766a084d5818254046f3ebe3b8f20a65e3a274640189e296667
Status: Downloaded newer image for mongo:latest
Pulling mongo-express (mongo-express:latest)...
latest: Pulling from library/mongo-express
c6b39de5b339: Pull complete
41c65f6bdf40: Pull complete
23ee6393f192: Pull complete
8f5ec9da9bc0: Pull complete
f541ec1a4067: Pull complete
4a17d49bb7c9: Pull complete
2aa624262f6c: Pull complete
f2d515a8401d: Pull complete
Digest: sha256:1b23d7976f0210dbec74045c209e52fbb26d29b2e873d6c6fa3d3f0ae32c2a64
Status: Downloaded newer image for mongo-express:latest
Building backend
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
code:log
Sending build context to Docker daemon 210.9kB
Step 1/9 : FROM node:18-alpine
18-alpine: Pulling from library/node
6e771e15690e: Pull complete
cdaa9ad1194b: Pull complete
39cf66406b72: Pull complete
c9177602ed83: Pull complete
Digest: sha256:e0340f26173b41066d68e3fe9bfbdb6571ab3cad0a4272919a52e36f4ae56925
Status: Downloaded newer image for node:18-alpine
---> 899806cd3ba7
Step 2/9 : WORKDIR /app
---> Running in 9132b8ba7368
---> Removed intermediate container 9132b8ba7368
---> f5256ebdf054
Step 3/9 : COPY package*.json ./
---> 1ef5caac6363
Step 4/9 : COPY tsconfig.json ./
---> b1be554904b1
Step 5/9 : RUN npm install
---> Running in 744fcd9e81e4
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
added 220 packages, and audited 221 packages in 5s
29 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.2.0
npm notice To update run: npm install -g npm@11.2.0
npm notice
---> Removed intermediate container 744fcd9e81e4
---> 93a3edcdf25a
Step 6/9 : COPY . .
---> a17f6346d0ea
Step 7/9 : RUN npm run build
---> Running in e5f6dd59907a
backend@1.0.0 build
tsc && copyfiles -u 2 "src/config/prompt-templates/*.txt" dist/config/prompt-templates/
---> Removed intermediate container e5f6dd59907a
---> f8f52f8c615e
Step 8/9 : EXPOSE 3001
---> Running in ba089ee12aa1
---> Removed intermediate container ba089ee12aa1
---> 61654f13ee86
---> Running in 5c067b8c1bf6
---> Removed intermediate container 5c067b8c1bf6
---> 890c7d0eb477
Successfully built 890c7d0eb477
Successfully tagged idobata-analyst_backend:latest
Building frontend
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
Sending build context to Docker daemon 504.8kB
Step 1/11 : FROM node:18-alpine as build
---> 899806cd3ba7
Step 2/11 : WORKDIR /app
---> Using cache
---> f5256ebdf054
Step 3/11 : COPY package*.json ./
---> 75fce61f37cf
Step 4/11 : RUN npm install
---> Running in fa81a48da3ae
added 411 packages, and audited 412 packages in 5s
153 packages are looking for funding
run npm fund for details
5 vulnerabilities (4 moderate, 1 high)
To address all issues, run:
npm audit fix
Run npm audit for details.
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.2.0
npm notice To update run: npm install -g npm@11.2.0
npm notice
---> Removed intermediate container fa81a48da3ae
---> df140e047e92
Step 5/11 : COPY . .
---> 97b86287218a
Step 6/11 : RUN npm run build
---> Running in 430e472a9768
frontend@0.0.0 build
tsc -b && vite build
vite v6.0.10 building for production...
transforming...
✓ 945 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html 0.46 kB │ gzip: 0.33 kB
dist/assets/index-C7nEd1xZ.css 24.89 kB │ gzip: 4.84 kB
dist/assets/index-oqA-oJ63.js 769.57 kB │ gzip: 227.47 kB
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 4.20s
---> Removed intermediate container 430e472a9768
---> 6454f69e698c
Step 7/11 : FROM nginx:alpine
alpine: Pulling from library/nginx
6e771e15690e: Already exists
0be31969a6d1: Pull complete
9e170776f94c: Pull complete
83f1386059fa: Pull complete
8ea77ffafa6e: Pull complete
76f8ad18306e: Pull complete
3c5c25f3816a: Pull complete
0a329c61f9e1: Pull complete
Digest: sha256:4ff102c5d78d254a6f0da062b3cf39eaf07f01eec0927fd21e219d0af8bc0591
Status: Downloaded newer image for nginx:alpine
---> cedb667e1a7b
Step 8/11 : COPY --from=build /app/dist /usr/share/nginx/html
---> 89c8d434ccda
Step 9/11 : COPY nginx.conf /etc/nginx/conf.d/default.conf
---> 57540da3b8b7
Step 10/11 : EXPOSE 3000
---> Running in 02c01e8f8324
---> Removed intermediate container 02c01e8f8324
---> 5323880b5007
---> Running in 16e082d3d86c
---> Removed intermediate container 16e082d3d86c
---> a815053fe3eb
Successfully built a815053fe3eb
Successfully tagged idobata-analyst_frontend:latest
Building chat-bot
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
Sending build context to Docker daemon 27.65kB
Step 1/9 : FROM node:18-slim
18-slim: Pulling from library/node
d51c377d94da: Pull complete
cfec654732f8: Pull complete
f57b15162860: Pull complete
068960bd522d: Pull complete
d56678c6dd13: Pull complete
Digest: sha256:a2169c129f5b02de0bc860d5db4de5d5ac8d5d9c204f0d3ace1022735217b2e7
Status: Downloaded newer image for node:18-slim
---> 835f1fb94a58
Step 2/9 : WORKDIR /app
---> Running in 9908f536f1f8
---> Removed intermediate container 9908f536f1f8
---> 693efefecb8f
Step 3/9 : COPY package.json ./
---> 6b634a0ae61a
Step 4/9 : RUN npm install
---> Running in 77b540de5be2
chat-bot@1.0.0 build
tsc
npm warn config production Use --omit=dev instead.
up to date, audited 99 packages in 1s
18 packages are looking for funding
run npm fund for details
found 0 vulnerabilities
---> Removed intermediate container 5a92e5532429
---> 11e36764d971
Step 8/9 : EXPOSE 3030
---> Running in 72cdddffa7cc
---> Removed intermediate container 72cdddffa7cc
---> bde238bafd67
---> Running in 43600eb4034a
---> Removed intermediate container 43600eb4034a
---> e6b7e9be9a10
Successfully built e6b7e9be9a10
Successfully tagged idobata-analyst_chat-bot:latest
Creating idobata-analyst_mongodb_1 ... done
Creating idobata-analyst_backend_1 ... done
Creating idobata-analyst_mongo-express_1 ... done
Creating idobata-analyst_chat-bot_1 ... done
Creating idobata-analyst_frontend_1 ... done
なんか依存関係が古いって警告出てるな
まーそれは無視していいか
https://gyazo.com/6a1b3803079cb6620d9c796b1add1a54
この状態だとbuildしただけでcontainersは実行されていない
idobata-analystを右クリックし、Compose Startを選択する
docker compose -f 'docker-compose.yml' up -d --buildが実行される
17:53:03 あれれ、localhostに接続できない
Compose Restartしてもだめだ
docker-compose --file 'docker-compose.yml' --project-name 'idobata-analyst' restartが実行されたみたい
これまともにDockerがうごく環境なのかあやしいな