File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,18 @@ RUN /doccano/tools/install-mssql.sh
4848
4949RUN useradd -ms /bin/sh doccano
5050
51+ RUN mkdir /data \
52+ && chown doccano:doccano /data
53+
5154COPY --from=builder /deps /deps
5255# hadolint ignore=DL3013
5356RUN pip install --no-cache-dir /deps/*.whl
5457
5558COPY --from=cleaner --chown=doccano:doccano /doccano /doccano
5659
60+ VOLUME /data
61+ ENV DATABASE_URL="sqlite:////data/doccano.db"
62+
5763ENV DEBUG="True"
5864ENV SECRET_KEY="change-me-in-production"
5965ENV PORT="8000"
Original file line number Diff line number Diff line change @@ -60,15 +60,26 @@ git clone https://github.com/chakki-works/doccano.git --config core.autocrlf=inp
6060
6161# ## Docker
6262
63+ As a one-time setup, create a Docker container for Doccano :
64+
65+ ` ` ` bash
66+ docker pull chakkiworks/doccano
67+ docker container create --name doccano \
68+ -e "ADMIN_USERNAME=admin" \
69+ -e "ADMIN_EMAIL=admin@example.com" \
70+ -e "ADMIN_PASSWORD=password" \
71+ -p 8000:8000 chakkiworks/doccano
72+ ` ` `
73+
74+ Next, start Doccano by running the container :
75+
6376` ` ` bash
64- $ docker pull chakkiworks/doccano
65- $ docker run -d --rm --name doccano \
66- -e "ADMIN_USERNAME=admin" \
67- -e "ADMIN_EMAIL=admin@example.com" \
68- -e "ADMIN_PASSWORD=password" \
69- -p 8000:8000 chakkiworks/doccano
77+ docker container start doccano
7078` ` `
7179
80+ To stop the container, run `docker container stop doccano -t 5`.
81+ All data created in the container will persist across restarts.
82+
7283Access <http://127.0.0.1:8000/>.
7384
7485# # One-click Deployment
You can’t perform that action at this time.
0 commit comments