Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test frontend #27

Open
gmacario opened this issue Jul 16, 2021 · 8 comments
Open

Test frontend #27

gmacario opened this issue Jul 16, 2021 · 8 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@gmacario
Copy link
Collaborator

Gated by #26

@GGn0 would you take ownership of this task, of course with support of all the other team members?
If you find issues please file them and assign the the component owners according to the RASI chart.

Thanks

@gmacario gmacario added this to the M1. First deployment to DO milestone Jul 16, 2021
@gmacario gmacario added the help wanted Extra attention is needed label Jul 16, 2021
@gmacario
Copy link
Collaborator Author

I heard no objections, therefore I assign the issue to @GGn0

@GGn0
Copy link
Collaborator

GGn0 commented Jul 17, 2021

This is the result I get, looks fine to me!
image

I just opened a PR (#33) to add a couple of minor changes that came to mind while testing

@gmacario
Copy link
Collaborator Author

New release of Frontend merged in #30, please test!

@gmacario
Copy link
Collaborator Author

gmacario commented Jul 19, 2021

@gteti as you have done some tests would you mind adding a short comment here - even if the tests were successful?
If not, please file separate bugs and assign them to the component owners according to the RASI chart.

Thanks

@gteti
Copy link
Member

gteti commented Jul 19, 2021

Yes

First running docker-compose

I've run the
Run the following command from a shell:

docker-compose up -d

Which gives:

user@ubuntu1910vm:~/blobfishes$ sudo docker-compose up -d
WARNING: The PWD variable is not set. Defaulting to a blank string.
Creating network "blobfishes_default" with the default driver
Building static-pages
Step 1/7 : FROM node:14.17.3-alpine
14.17.3-alpine: Pulling from library/node
ddad3d7c1e96: Already exists
59857143b378: Pull complete
9f27d30bcf3a: Pull complete
be8cf85a075d: Pull complete
Digest: sha256:fb6cb918cc72869bd625940f42a7d8ae035c4e786d08187b94e8b91c6a534dfd
Status: Downloaded newer image for node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Running in baf5eb181e42
Removing intermediate container baf5eb181e42
 ---> a927eeaa605b
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> d3a63d362006
Step 4/7 : RUN npm install --silent
 ---> Running in b34dd71fb369
[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: node-sass/sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc...
added 305 packages from 259 contributors and audited 307 packages in 17.505s

42 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Removing intermediate container b34dd71fb369
 ---> 6cb69c09b7e0
Step 5/7 : COPY . .
 ---> c3946d187ff9
Step 6/7 : RUN npm run build
 ---> Running in e55f2b9335de

> [email protected] build /usr/src/app
> svelte-kit build

vite v2.4.2 building for production...
transforming...

warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
✓ 18 modules transformed.
rendering chunks...
.svelte-kit/output/client/_app/manifest.json                               1.30kb
.svelte-kit/output/client/_app/pages/__layout.svelte-26dcdf13.js           1.75kb / brotli: 0.80kb
.svelte-kit/output/client/_app/error.svelte-e8e349f2.js                    1.55kb / brotli: 0.64kb
.svelte-kit/output/client/_app/assets/start-0826e215.css                   0.18kb / brotli: 0.11kb
.svelte-kit/output/client/_app/pages/index.svelte-53346cf9.js              0.83kb / brotli: 0.43kb
.svelte-kit/output/client/_app/assets/pages/index.svelte-92f2f640.css      0.14kb / brotli: 0.09kb
.svelte-kit/output/client/_app/chunks/vendor-76ea059a.js                   6.42kb / brotli: 2.45kb
.svelte-kit/output/client/_app/assets/pages/__layout.svelte-ad4f48dc.css   5.54kb / brotli: 1.58kb
.svelte-kit/output/client/_app/start-7b8815ea.js                           17.47kb / brotli: 5.58kb
vite v2.4.2 building SSR bundle for production...
transforming...
✓ 15 modules transformed.
rendering chunks...
.svelte-kit/output/server/app.js   18.48kb

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-static
  ✔ done
Removing intermediate container e55f2b9335de
 ---> f3f309a1a00a
Step 7/7 : CMD ["ls", "-laR", "build/"]
 ---> Running in 96b53de7f774
Removing intermediate container 96b53de7f774
 ---> cff23ea6c943
Successfully built cff23ea6c943
Successfully tagged blobfishes_static-pages:latest
WARNING: Image for service static-pages was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Building server
Step 1/7 : FROM node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> a927eeaa605b
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> 71ac792e3985
Step 4/7 : RUN npm install --silent
 ---> Running in db5ae57103e7
[bcrypt] Success: "/usr/src/app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" is installed via remote
Love nodemon? You can now support the project via the open collective:
 > https://opencollective.com/nodemon/donate

added 602 packages from 606 contributors and audited 612 packages in 12.078s

30 packages are looking for funding
  run `npm fund` for details

found 2 moderate severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details
Removing intermediate container db5ae57103e7
 ---> 86128cace3a6
Step 5/7 : COPY . .
 ---> 66d304b24b1d
Step 6/7 : RUN npm run build
 ---> Running in d7b34c09c466

> [email protected] build /usr/src/app
> tsc

Removing intermediate container d7b34c09c466
 ---> 69049ab49719
Step 7/7 : CMD ["node", "dist/app.js"]
 ---> Running in 27255a5253af
Removing intermediate container 27255a5253af
 ---> 147add4814c2
Successfully built 147add4814c2
Successfully tagged blobfishes_server:latest
WARNING: Image for service server was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating blobfishes_server_1       ... done
Creating blobfishes_static-pages_1 ... done

I've tried running the command

docker-compose up --build --force-recreate

Which gives

user@ubuntu1910vm:~/blobfishes$ sudo docker-compose up --build --force-recreate
WARNING: The PWD variable is not set. Defaulting to a blank string.
Building static-pages
Step 1/7 : FROM node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> a927eeaa605b
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> Using cache
 ---> d3a63d362006
Step 4/7 : RUN npm install --silent
 ---> Using cache
 ---> 6cb69c09b7e0
Step 5/7 : COPY . .
 ---> Using cache
 ---> c3946d187ff9
Step 6/7 : RUN npm run build
 ---> Using cache
 ---> f3f309a1a00a
Step 7/7 : CMD ["ls", "-laR", "build/"]
 ---> Using cache
 ---> cff23ea6c943
Successfully built cff23ea6c943
Successfully tagged blobfishes_static-pages:latest
Building server
Step 1/7 : FROM node:14.17.3-alpine
 ---> f5f48375fc5d
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> a927eeaa605b
Step 3/7 : COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
 ---> Using cache
 ---> 71ac792e3985
Step 4/7 : RUN npm install --silent
 ---> Using cache
 ---> 86128cace3a6
Step 5/7 : COPY . .
 ---> Using cache
 ---> 66d304b24b1d
Step 6/7 : RUN npm run build
 ---> Using cache
 ---> 69049ab49719
Step 7/7 : CMD ["node", "dist/app.js"]
 ---> Using cache
 ---> 147add4814c2
Successfully built 147add4814c2
Successfully tagged blobfishes_server:latest
Recreating blobfishes_static-pages_1 ... done
Recreating blobfishes_server_1       ... done
Attaching to blobfishes_static-pages_1, blobfishes_server_1
static-pages_1  | build/:
static-pages_1  | total 20
static-pages_1  | drwxr-xr-x    3 root     root          4096 Jul 19 06:24 .
static-pages_1  | drwxr-xr-x    1 root     root          4096 Jul 19 06:24 ..
static-pages_1  | drwxr-xr-x    5 root     root          4096 Jul 19 06:24 _app
static-pages_1  | -rw-rw-r--    1 root     root          1571 Jul 19 06:24 favicon.png
static-pages_1  | -rw-r--r--    1 root     root           789 Jul 19 06:24 index.html
static-pages_1  | 
static-pages_1  | build/_app:
static-pages_1  | total 44
static-pages_1  | drwxr-xr-x    5 root     root          4096 Jul 19 06:24 .
static-pages_1  | drwxr-xr-x    3 root     root          4096 Jul 19 06:24 ..
static-pages_1  | drwxr-xr-x    3 root     root          4096 Jul 19 06:24 assets
static-pages_1  | drwxr-xr-x    2 root     root          4096 Jul 19 06:24 chunks
static-pages_1  | -rw-r--r--    1 root     root          1588 Jul 19 06:24 error.svelte-e8e349f2.js
static-pages_1  | drwxr-xr-x    2 root     root          4096 Jul 19 06:24 pages
static-pages_1  | -rw-r--r--    1 root     root         17893 Jul 19 06:24 start-7b8815ea.js
static-pages_1  | 
static-pages_1  | build/_app/assets:
static-pages_1  | total 16
static-pages_1  | drwxr-xr-x    3 root     root          4096 Jul 19 06:24 .
static-pages_1  | drwxr-xr-x    5 root     root          4096 Jul 19 06:24 ..
static-pages_1  | drwxr-xr-x    2 root     root          4096 Jul 19 06:24 pages
static-pages_1  | -rw-r--r--    1 root     root           189 Jul 19 06:24 start-0826e215.css
static-pages_1  | 
static-pages_1  | build/_app/assets/pages:
static-pages_1  | total 20
static-pages_1  | drwxr-xr-x    2 root     root          4096 Jul 19 06:24 .
static-pages_1  | drwxr-xr-x    3 root     root          4096 Jul 19 06:24 ..
static-pages_1  | -rw-r--r--    1 root     root          5671 Jul 19 06:24 __layout.svelte-ad4f48dc.css
static-pages_1  | -rw-r--r--    1 root     root           139 Jul 19 06:24 index.svelte-92f2f640.css
static-pages_1  | 
static-pages_1  | build/_app/chunks:
static-pages_1  | total 16
static-pages_1  | drwxr-xr-x    2 root     root          4096 Jul 19 06:24 .
static-pages_1  | drwxr-xr-x    5 root     root          4096 Jul 19 06:24 ..
static-pages_1  | -rw-r--r--    1 root     root          6574 Jul 19 06:24 vendor-76ea059a.js
static-pages_1  | 
static-pages_1  | build/_app/pages:
static-pages_1  | total 16
static-pages_1  | drwxr-xr-x    2 root     root          4096 Jul 19 06:24 .
static-pages_1  | drwxr-xr-x    5 root     root          4096 Jul 19 06:24 ..
static-pages_1  | -rw-r--r--    1 root     root          1793 Jul 19 06:24 __layout.svelte-26dcdf13.js
static-pages_1  | -rw-r--r--    1 root     root           845 Jul 19 06:24 index.svelte-53346cf9.js
blobfishes_static-pages_1 exited with code 0
server_1        | /usr/src/app/dist/config/index.js:12
server_1        |     throw new Error("⚠️  Couldn't find .env file  ⚠️");
server_1        |     ^
server_1        | 
server_1        | Error: ⚠️  Couldn't find .env file  ⚠️
server_1        |     at Object.<anonymous> (/usr/src/app/dist/config/index.js:12:11)
server_1        |     at Module._compile (internal/modules/cjs/loader.js:1085:14)
server_1        |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
server_1        |     at Module.load (internal/modules/cjs/loader.js:950:32)
server_1        |     at Function.Module._load (internal/modules/cjs/loader.js:790:14)
server_1        |     at Module.require (internal/modules/cjs/loader.js:974:19)
server_1        |     at require (internal/modules/cjs/helpers.js:92:18)
server_1        |     at Object.<anonymous> (/usr/src/app/dist/loaders/logger.js:8:34)
server_1        |     at Module._compile (internal/modules/cjs/loader.js:1085:14)
server_1        |     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
blobfishes_server_1 exited with code 1

I've tried using the env file shared through telegram but I'm too noob with docker-compose so I've left it there.

Client development build

Used the commands:

cd client
npm install
npm run dev

That gives :

user@ubuntu1910vm:~/blobfishes/client$ npm install

added 306 packages, and audited 307 packages in 13s

found 0 vulnerabilities
npm notice 
npm notice New minor version of npm available! 7.13.0 -> 7.20.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.20.0
npm notice Run npm install -g [email protected] to update!
npm notice 
user@ubuntu1910vm:~/blobfishes/client$ npm run dev

> [email protected] dev
> svelte-kit dev


  SvelteKit v1.0.0-next.131

  local:   http://localhost:3000
  network: not exposed
  network: not exposed

  Use --host to expose server to other devices on this network



warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.

The displayed webpage is correctly rendered in localhost:3000

_/°U°\_
Blobfish

Hugly Book Collection Manager
Welcome to SvelteKit

Visit kit.svelte.dev to read the documentation

@gmacario
Copy link
Collaborator Author

@gteti

I've tried using the env file shared through telegram but I'm too noob with docker-compose so I've left it there.

Please read updated section "Running blobfishes in Docker" at
https://github.com/aquariophilie/blobfishes/blob/feature/43-deploy-blobfishes-to-digitalocean/README.md

If it works I will merge #43 so that it will end up in the main branch

@gmacario
Copy link
Collaborator Author

I have tested frontend and discovered #51

@gmacario
Copy link
Collaborator Author

PR #53 merged, please re-test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants