feat: dockerization
This commit is contained in:
parent
134ef26662
commit
e12a067959
2 changed files with 15 additions and 22 deletions
|
@ -8,30 +8,14 @@ services:
|
|||
volumes:
|
||||
- ./front:/front
|
||||
- /front/node_modules/
|
||||
environment:
|
||||
environment:
|
||||
HOST: 0.0.0.0
|
||||
|
||||
|
||||
server:
|
||||
build: ./server
|
||||
ports:
|
||||
- 8080:8080
|
||||
command: python manage.py runserver 0.0.0.0:8000
|
||||
volumes:
|
||||
- ./server:/server
|
||||
- /server/node_modules/
|
||||
environment:
|
||||
- DATABASE_URL=mongo
|
||||
- WAIT_HOSTS=mongo:27017
|
||||
- PORT=8080
|
||||
- DEBUG=dev
|
||||
- NODE_ENV=development
|
||||
- DB_NAME=dev
|
||||
depends_on:
|
||||
- database
|
||||
|
||||
database:
|
||||
image: mongo
|
||||
container_name: mongo
|
||||
ports:
|
||||
- 27017:27017
|
||||
volumes:
|
||||
- ./db:/data/db
|
||||
- ./server:/code
|
||||
ports:
|
||||
- "8000:8000"
|
||||
|
|
9
server/Dockerfile
Normal file
9
server/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
# syntax=docker/dockerfile:1
|
||||
FROM python:3
|
||||
ENV PYTHONDONTWRITEBYTECODE=1
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
WORKDIR /code
|
||||
COPY requirements.txt /code/
|
||||
RUN pip install -r requirements.txt
|
||||
COPY . /code/
|
||||
|
Loading…
Reference in a new issue