add data volume to ta container

This commit is contained in:
simon 2022-05-20 19:53:04 +07:00
parent 4c4ff0845b
commit f38d8a3594
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
4 changed files with 8 additions and 0 deletions

View File

@ -47,6 +47,8 @@ services:
container_name: tubearchivist
build: ./tubearchivist/web
restart: always
volumes:
- ./volume/tubearchivist/data:/data
env_file:
- ./env/tubearchivist.env
expose:

View File

@ -14,6 +14,8 @@ services:
container_name: tubearchivist
build: ./tubearchivist/web
restart: always
volumes:
- ./volume/tubearchivist/data:/data
env_file:
- ./env/tubearchivist.env
expose:

View File

@ -9,9 +9,12 @@ COPY requirements.txt /requirements.txt
RUN pip install --upgrade pip setuptools && \
pip install --no-cache-dir -r /requirements.txt --src /usr/local/src
RUN mkdir /data
COPY . /srv/flask_app
WORKDIR /srv/flask_app
RUN chmod +x ./start.sh
VOLUME /data
CMD ["./start.sh"]

View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
mkdir -p "/data/hooks"
uwsgi --ini uwsgi.ini