Browse Source

Add volume for SQLite DB in doccano container

pull/441/head
Clemens Wolff 5 years ago
parent
commit
fa4d92ee53
2 changed files with 23 additions and 6 deletions
  1. 6
      Dockerfile
  2. 23
      README.md

6
Dockerfile

@ -48,12 +48,18 @@ RUN /doccano/tools/install-mssql.sh
RUN useradd -ms /bin/sh doccano
RUN mkdir /data \
&& chown doccano:doccano /data
COPY --from=builder /deps /deps
# hadolint ignore=DL3013
RUN pip install --no-cache-dir /deps/*.whl
COPY --from=cleaner --chown=doccano:doccano /doccano /doccano
VOLUME /data
ENV DATABASE_URL="sqlite:////data/doccano.db"
ENV DEBUG="True"
ENV SECRET_KEY="change-me-in-production"
ENV PORT="8000"

23
README.md

@ -60,15 +60,26 @@ git clone https://github.com/chakki-works/doccano.git --config core.autocrlf=inp
### Docker
As a one-time setup, create a Docker container for Doccano:
```bash
docker pull chakkiworks/doccano
docker container create --name doccano \
-e "ADMIN_USERNAME=admin" \
-e "ADMIN_EMAIL=admin@example.com" \
-e "ADMIN_PASSWORD=password" \
-p 8000:8000 chakkiworks/doccano
```
Next, start Doccano by running the container:
```bash
$ docker pull chakkiworks/doccano
$ docker run -d --rm --name doccano \
-e "ADMIN_USERNAME=admin" \
-e "ADMIN_EMAIL=admin@example.com" \
-e "ADMIN_PASSWORD=password" \
-p 8000:8000 chakkiworks/doccano
docker container start doccano
```
To stop the container, run `docker container stop doccano -t 5`.
All data created in the container will persist across restarts.
Access <http://127.0.0.1:8000/>.
## One-click Deployment

Loading…
Cancel
Save