Serve the html pages in development from the neutrino development server

RESOLVED FIXED

Status

Conduit
General
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mars, Assigned: mars)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 3

2 years ago
mozreview-review
Comment on attachment 8832233 [details]
autoland: use the neutrino dev server to serve static files (bug 1335535)

https://reviewboard.mozilla.org/r/108578/#review109802

::: autoland/docker-compose.yml:19
(Diff revision 1)
> -  uibuilder:
> +  uidevserver:
>      build:
>        context: ./ui
>        dockerfile: ./docker/Dockerfile-dev
>      volumes:
> -      - ./ui/build:/code/build
> +      - ./ui:/code

As part of my proposed change, this can be changed to: 

`- ./ui/src:/code/src`

::: autoland/docker/web/nginx-conf.d/default.conf:9
(Diff revision 1)
>      location / {
> -        root   /usr/share/nginx/html;
> +        proxy_pass  http://uidevserver:4000/;
> -        index  index.html index.htm;
>      }
>  
>      # redirect server error pages to the static page /50x.html

Lines 9 to 14 can be removed. Error pages will likely be presented by the autoland-ui, as opposed to nginx's default error pages.

::: autoland/ui/docker/Dockerfile-dev:5
(Diff revision 1)
>  # This Source Code Form is subject to the terms of the Mozilla Public
>  # License, v. 2.0. If a copy of the MPL was not distributed with this
>  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
>  
>  FROM node:7-alpine

As part of my proposed change, this file can be simplified to:

```
FROM node:7-alpine

RUN npm install -g yarn@0.19.1

RUN mkdir -p /code

COPY ./package.json /code/package.json

COPY ./yarn.lock /code/yarn.lock

WORKDIR /code

RUN yarn --pure-lockfile

EXPOSE 4000

ENTRYPOINT cd /code; yarn start
```

::: autoland/ui/docker/run.sh:1
(Diff revision 1)
> +#!/bin/sh

As part of my proposed change, this entire file can be removed.
Attachment #8832233 - Flags: review?(imadueme) → review-

Comment 4

2 years ago
mozreview-review-reply
Comment on attachment 8832233 [details]
autoland: use the neutrino dev server to serve static files (bug 1335535)

https://reviewboard.mozilla.org/r/108578/#review109802

> As part of my proposed change, this file can be simplified to:
> 
> ```
> FROM node:7-alpine
> 
> RUN npm install -g yarn@0.19.1
> 
> RUN mkdir -p /code
> 
> COPY ./package.json /code/package.json
> 
> COPY ./yarn.lock /code/yarn.lock
> 
> WORKDIR /code
> 
> RUN yarn --pure-lockfile
> 
> EXPOSE 4000
> 
> ENTRYPOINT cd /code; yarn start
> ```

This file could possibly be removed out of the docker folder as well.

Comment 5

2 years ago
mozreview-review-reply
Comment on attachment 8832233 [details]
autoland: use the neutrino dev server to serve static files (bug 1335535)

https://reviewboard.mozilla.org/r/108578/#review109802

> Lines 9 to 14 can be removed. Error pages will likely be presented by the autoland-ui, as opposed to nginx's default error pages.

(Unless you want to keep them of course)

Comment 6

2 years ago
mozreview-review
Comment on attachment 8832234 [details]
autoland: add a README.md for project developers (bug 1335535)

https://reviewboard.mozilla.org/r/108580/#review109956

Looks good as a start Readme :)
Attachment #8832234 - Flags: review?(imadueme) → review+
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 9

2 years ago
mozreview-review
Comment on attachment 8832233 [details]
autoland: use the neutrino dev server to serve static files (bug 1335535)

https://reviewboard.mozilla.org/r/108578/#review110074

mars: works perfect :ok_hand:. For others, this is the process I followed to avoid caching issues.
1. `docker-compose down` (to stop and delete the old images)
2. `docker-compose build --no-cache` (it hangs on 'Building yarn' for a bit, but, that's ok)
3. `docker-compose up --force-recreate`
4. CTRL+C after the images come up, I think the first time it is run nginx just cant find yarn which is totally ok.
5. `docker-compose up` as you usually do :) (or add the -d flag to run detached)
6. Check out maris's readme for the correct host and port to connect to.
Attachment #8832233 - Flags: review?(imadueme) → review+

Comment 10

2 years ago
mozreview-review
Comment on attachment 8832234 [details]
autoland: add a README.md for project developers (bug 1335535)

https://reviewboard.mozilla.org/r/108580/#review110076

Still good!

Comment 11

2 years ago
mozreview-review
Comment on attachment 8832233 [details]
autoland: use the neutrino dev server to serve static files (bug 1335535)

https://reviewboard.mozilla.org/r/108578/#review110078

Rubber stamp for landing.
Attachment #8832233 - Flags: review+

Comment 12

2 years ago
mozreview-review
Comment on attachment 8832234 [details]
autoland: add a README.md for project developers (bug 1335535)

https://reviewboard.mozilla.org/r/108580/#review110082

Rubber stamp for landing.
Attachment #8832234 - Flags: review+

Comment 13

2 years ago
Pushed by mcote@mozilla.com:
https://hg.mozilla.org/automation/conduit/rev/c42b2d9dc341
autoland: use the neutrino dev server to serve static files r=imadueme,mcote
https://hg.mozilla.org/automation/conduit/rev/8b8e55d47c75
autoland: add a README.md for project developers r=imadueme,mcote
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
Attachment #8832233 - Flags: review?(glob)
Attachment #8832234 - Flags: review?(glob)
You need to log in before you can comment on or make changes to this bug.