HugoFara / lwt

Learn languages by reading! A language learning app stemmed from Learning with Texts (LWT).
https://hugofara.github.io/lwt/
The Unlicense
169 stars 19 forks source link

Mapping ``media/`` with a volume for Docker #106

Closed HugoFara closed 1 year ago

HugoFara commented 1 year ago

Using Docker, an user can create a folder media/ to add it's videos. The problem is that destroying the container will erase this folder. Mapping it to a volume would solve the issue.

parradam commented 1 year ago

Here is the docker-compose.yml (for LWT 2.0.3):



services:
  mariadb:
    image: mariadb:10.6
    restart: always
    environment:
      - "MARIADB_ROOT_PASSWORD=qwerty"
    volumes:
      - /root/docker-images/lwt/db:/var/lib/mysql
  lwt:
    build:
      dockerfile: Dockerfile
    restart: always
    environment:
      - "MARIADB_SERVER=mariadb"
      - "MARIADB_ROOT_PASSWORD=qwerty"
    volumes:
      - /root/docker-images/lwt/media:/var/www/media
    ports:
      - "50000:80"
    depends_on:
      - mariadb```
HugoFara commented 1 year ago

Thanks a lot for spotting and solving this issue!