Compare commits
2 Commits
trunk
...
0343b43b50
| Author | SHA1 | Date | |
|---|---|---|---|
| 0343b43b50 | |||
| 0e3f8c2d8e |
16
Dockerfile
16
Dockerfile
@@ -1,11 +1,3 @@
|
||||
FROM node:latest
|
||||
|
||||
WORKDIR /opt/mojo_app/
|
||||
|
||||
COPY mojo_app/package.json .
|
||||
COPY mojo_app/package-lock.json .
|
||||
RUN npm install
|
||||
|
||||
FROM perl:latest
|
||||
|
||||
WORKDIR /opt/app/
|
||||
@@ -14,11 +6,11 @@ COPY cpanfile .
|
||||
COPY cpanfile.snapshot .
|
||||
COPY mojo_app ./mojo_app/
|
||||
|
||||
RUN cpanm -nv Carton && carton install
|
||||
|
||||
WORKDIR /opt/app/mojo_app/
|
||||
COPY --from=0 /opt/mojo_app/ .
|
||||
RUN cpanm Carton && carton install
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
WORKDIR /opt/app/mojo_app/
|
||||
|
||||
ENTRYPOINT ["carton", "exec", "--", "morbo", "script/mojo_app"]
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -16,21 +16,8 @@ Visit `localhost:3000` with web browser.
|
||||
|
||||
## serve app with local changes
|
||||
|
||||
### install Mojolicious dependencies
|
||||
|
||||
$ docker run --rm -v $PWD:/opt/app --entrypoint carton mojo_app install
|
||||
|
||||
### install Node packages
|
||||
|
||||
$ docker run --rm --init -w /opt/mojo_app -v $PWD/mojo_app:/opt/mojo_app node npm install
|
||||
|
||||
### start the server
|
||||
|
||||
$ docker run --rm -v $PWD:/opt/app -p 3000:3000 mojo_app
|
||||
$ docker run --rm -it -p 3000:3000 -v $PWD:/opt/app mojo_app
|
||||
|
||||
Visit `localhost:3000` with web browser. Changes should load when you reload
|
||||
the page, without having to restart the server.
|
||||
|
||||
## run tests
|
||||
|
||||
$ docker run --rm -t -v $PWD:/opt/app --entrypoint carton mojo_app exec -- prove -lv t
|
||||
|
||||
Reference in New Issue
Block a user