Setup nodejs in docker file
This commit is contained in:
parent
9feafdb8a1
commit
c04040489e
5 changed files with 34 additions and 2 deletions
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
10.5.0
|
13
Dockerfile
13
Dockerfile
|
@ -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
|
||||||
|
|
|
@ -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
5
package-lock.json
generated
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"name": "website",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 1
|
||||||
|
}
|
12
package.json
Normal file
12
package.json
Normal 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": {}
|
||||||
|
}
|
Reference in a new issue