1
Fork 0

Setup nodejs in docker file

This commit is contained in:
Jake Howard 2018-07-22 21:30:19 +01:00
parent 9feafdb8a1
commit c04040489e
Signed by: jake
GPG key ID: 57AFB45680EDD477
5 changed files with 34 additions and 2 deletions

1
.nvmrc Normal file
View file

@ -0,0 +1 @@
10.5.0

View file

@ -11,10 +11,21 @@ WORKDIR /app
COPY Pipfile Pipfile COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock COPY Pipfile.lock Pipfile.lock
COPY .nvmrc .nvmrc
COPY package.json package.json
COPY package-lock.json package-lock.json
RUN pipenv install --deploy --system RUN pipenv install --deploy --system
COPY . /app RUN /opt/setup-pyenv-nvm.sh npm install
COPY manage.py /app/manage.py
COPY project/ /app/project/
COPY static/ /app/static/
COPY templates/ /app/templates/
RUN ./manage.py collectstatic --noinput RUN ./manage.py collectstatic --noinput
ENTRYPOINT ["/opt/setup-pyenv-nvm.sh"]
EXPOSE 8000 EXPOSE 8000

View file

@ -27,6 +27,9 @@ services:
ports: ports:
- "8000:8000" - "8000:8000"
volumes: volumes:
- ".:/app" - ./project/:/app/project/
- ./static/:/app/static/
- ./templates/:/app/templates/
depends_on: depends_on:
- db - db

5
package-lock.json generated Normal file
View file

@ -0,0 +1,5 @@
{
"name": "website",
"version": "1.0.0",
"lockfileVersion": 1
}

12
package.json Normal file
View file

@ -0,0 +1,12 @@
{
"name": "website",
"version": "1.0.0",
"description": "",
"scripts": {},
"repository": {
"type": "git",
"url": "git+https://github.com/RealOrangeOne/website.git"
},
"author": "",
"dependencies": {}
}