Add docker support
This commit is contained in:
parent
fd0bb7b729
commit
5c0c342407
5 changed files with 19017 additions and 0 deletions
2
.Dockerignore
Normal file
2
.Dockerignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
__pycache__
|
||||
node_modules
|
32
Dockerfile
Normal file
32
Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
|||
FROM nikolaik/python-nodejs:python3.9-nodejs15
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY package-lock.json .
|
||||
COPY frontend/package*.json ./frontend/
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app/* ./app/
|
||||
COPY app/API/* ./app/API/
|
||||
COPY app/migrations/* ./app/migrations/
|
||||
COPY frontend/* ./frontend/
|
||||
COPY frontend/src/* ./frontend/src/
|
||||
COPY frontend/migrations/* ./frontend/migrations/
|
||||
COPY frontend/static/frontend/* ./frontend/static/frontend/
|
||||
COPY frontend/static/frontend/css/* ./frontend/static/frontend/css/
|
||||
COPY frontend/static/frontend/images/* ./frontend/static/frontend/images/
|
||||
COPY frontend/templates/frontend/* ./frontend/templates/frontend/
|
||||
COPY wulkanowy/* ./wulkanowy/
|
||||
COPY manage.py .
|
||||
|
||||
RUN python manage.py makemigrations
|
||||
RUN python manage.py migrate
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT [ "python3", "manage.py", "runserver", "0.0.0.0:8000" ]
|
10
README.md
10
README.md
|
@ -26,3 +26,13 @@ And in frontend:
|
|||
```shell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
# Docker
|
||||
## With docker compose
|
||||
```shell
|
||||
docker-compose up -d
|
||||
```
|
||||
## Without docker compose
|
||||
```shell
|
||||
docker build -t wulkanowy/web .
|
||||
docker run -d -p 8000:8000 wulkanowy/web
|
7
docker-compose.yml
Normal file
7
docker-compose.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
version: '3.9'
|
||||
services:
|
||||
app:
|
||||
container_name: wulkanowy_web
|
||||
build: .
|
||||
ports:
|
||||
- "8000:8000"
|
18966
package-lock.json
generated
Normal file
18966
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue