-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from bbsaclay/master
v0.6.0
- Loading branch information
Showing
25 changed files
with
236 additions
and
708 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
build/ | ||
package-lock.json | ||
*-bundle.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
FROM ubuntu:20.04 | ||
|
||
# Install Node.js | ||
RUN apt-get update && apt-get install -y --reinstall ca-certificates curl build-essential | ||
RUN curl --silent --location https://deb.nodesource.com/setup_12.x | bash - | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update | ||
RUN apt-get install -y nodejs | ||
RUN npm install -g [email protected] | ||
RUN node --version | ||
|
||
# Copy bundled frontend | ||
# Copy bundled frontend and backend dependencies | ||
COPY build build | ||
COPY node_modules node_modules | ||
|
||
# Copy files for the backend | ||
COPY package.json package.json | ||
COPY server server | ||
COPY .logo-ascii .logo-ascii | ||
|
||
# Install backend dependencies | ||
RUN npm install | ||
EXPOSE 3000 | ||
|
||
# default files and folders (usefull when no volume can be mounted with this image) | ||
RUN mkdir -p /data | ||
|
||
COPY data-test /data/data-test | ||
|
||
# ENTRYPOINT ["node", "server/server.js"] | ||
RUN echo 'cat .logo-ascii && node server/server.js "$@"' > entrypoint.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ pixano ./data-test --port 3001 | |
|
||
#### Install global dependencies | ||
|
||
- NodeJS (>=12) | ||
- NodeJS (10, 12 or 14) | ||
To install on ubuntu: | ||
|
||
```bash | ||
|
@@ -78,6 +78,8 @@ nodejs --version | |
npm install -g [email protected] | ||
``` | ||
You can read this nice [introduction](https://codeburst.io/the-only-nodejs-introduction-youll-ever-need-d969a47ef219) to NodeJS in case you're curious on how it works. | ||
|
||
> ATTENTION: node version 16 is not compatible for now | ||
#### Install application dependencies | ||
|
||
|
@@ -90,10 +92,16 @@ If you want to use custom `pixano-element` modules from local path instead of th | |
|
||
```bash | ||
# Install application dependencies and local pixano-elements | ||
npm run installLocalElements --path=../../pixano-elements | ||
npm run installLocalElements --path=$PIXANO_ELEMENTS_PATH | ||
``` | ||
*NB: Make sure you have the git repository of pixano-elements next to the pixano-app folder and that you have followed the pixano-elements build instructions before running the above commands.* | ||
|
||
If this command breaks your local pixano-elements demo, this command will repear it: | ||
```bash | ||
cd $PIXANO_ELEMENTS_PATH | ||
npm run bootstrap | ||
``` | ||
|
||
#### Build the application | ||
|
||
```bash | ||
|
@@ -187,10 +195,13 @@ The `task1.json` file contains global task settings (task type, task categories, | |
|
||
### Build docker from sources | ||
|
||
To create a docker image of the application, build the application (step 1.b) and then run: | ||
To create a docker image of the application, you can use the standard docker command: | ||
```bash | ||
# You can change `pixano` by your choosen image name | ||
sudo docker build -t pixano/pixano-app:my-tag . | ||
``` | ||
If you used a local pixano-element, build the application (step 1.b) and then run: | ||
```bash | ||
# You can use the local Dockerfile if the build folder already exists | ||
sudo docker build -t pixano/pixano-app:my-tag -f Dockerfile-local . | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.