Browse Source

Remove docker-compose.dev.yml

pull/1689/head
Hironsan 2 years ago
parent
commit
018a2405d3
3 changed files with 0 additions and 132 deletions
  1. 16
      README.md
  2. 23
      docker/Dockerfile.dev
  3. 93
      docker/docker-compose.dev.yml

16
README.md

@ -127,28 +127,12 @@ POSTGRES_PASSWORD=doccano
POSTGRES_DB=doccano POSTGRES_DB=doccano
``` ```
#### Production
After running the following command, access <http://127.0.0.1/>. After running the following command, access <http://127.0.0.1/>.
```bash ```bash
docker-compose -f docker/docker-compose.prod.yml --env-file ./docker/.env.example up docker-compose -f docker/docker-compose.prod.yml --env-file ./docker/.env.example up
``` ```
#### Development
After running the following command, access <http://127.0.0.1:3000/>. If you want to use the admin site, please access <http://127.0.0.1:8000/admin/>.
```bash
docker-compose -f docker/docker-compose.dev.yml --env-file ./docker/.env.example up
```
You can run the the test codes for the backend with the following command:
```bash
docker exec doccano_backend_1 python backend/manage.py test api
```
### One-click Deployment ### One-click Deployment
| Service | Button | | Service | Button |

23
docker/Dockerfile.dev

@ -1,23 +0,0 @@
ARG PYTHON_VERSION="3.8.12-slim-buster"
FROM python:${PYTHON_VERSION}
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
wget=1.* \
netcat=1.* \
libpq-dev=11.* \
unixodbc-dev=2.* \
g++=4:* \
libssl-dev=1.* \
&& apt-get clean
WORKDIR /src
COPY ./Pipfile* /src/
RUN pip install --upgrade pip \
&& pip install pipenv \
&& pipenv install --system --dev
COPY tools/ /opt/bin/
ENTRYPOINT [ "/opt/bin/dev-django.sh" ]

93
docker/docker-compose.dev.yml

@ -1,93 +0,0 @@
version: "3.7"
services:
backend:
build:
context: ..
dockerfile: docker/Dockerfile.dev
image: doccano_backend:dev
volumes:
- ..:/src
- venv:/root/.local/share
environment:
ADMIN_USERNAME: "${ADMIN_USERNAME}"
ADMIN_PASSWORD: "${ADMIN_PASSWORD}"
ADMIN_EMAIL: ${ADMIN_EMAIL}
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
ALLOW_SIGNUP: "False"
DEBUG: "True"
DJANGO_SETTINGS_MODULE: "config.settings.development"
ports:
- 8000:8000
depends_on:
- postgres
networks:
- network-backend
- network-frontend
celery:
build:
context: ..
dockerfile: docker/Dockerfile.dev
image: doccano_celery:dev
volumes:
- ..:/src
- venv:/root/.local/share
entrypoint: ["/src/tools/dev-celery.sh"]
environment:
PYTHONUNBUFFERED: "1"
CELERY_BROKER_URL: "amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq"
DATABASE_URL: "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
DJANGO_SETTINGS_MODULE: "config.settings.development"
depends_on:
- postgres
- rabbitmq
networks:
- network-backend
rabbitmq:
image: rabbitmq:3.8-alpine
environment:
RABBITMQ_DEFAULT_USER: "${RABBITMQ_DEFAULT_USER}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_DEFAULT_PASS}"
ports:
- 5672:5672
networks:
- network-backend
frontend:
image: node:16.13.0
command: ["/src/tools/dev-nuxt.sh"]
working_dir: /src/frontend
environment:
API_URL: "http://backend:8000"
volumes:
- ..:/src
- node_modules:/src/frontend/node_modules
ports:
- 3000:3000
depends_on:
- backend
networks:
- network-frontend
postgres:
image: postgres:13.3-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: "${POSTGRES_USER}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB}"
networks:
- network-backend
volumes:
postgres_data:
node_modules:
venv:
networks:
network-backend:
network-frontend:
Loading…
Cancel
Save