question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change data directory

See original GitHub issue

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn’t find similar issue

🛡️ Security Policy

📝 Describe your problem

I am currently making an Uptime Kuma add on for home assistant. I have had to make a container from scratch which is working fine and running in Home Assistant. My issue is that home assistant requires set directories to be mapped, in this case /media/<YOUR_FOLDER>

At the moment the data gets stored in the working directory/data. Is there an option to choose where the data is stored?

My Docker file is below if it helps?

ARG BUILD_FROM=ghcr.io/hassio-addons/base/armhf:11.1.0
# hadolint ignore=DL3006
FROM ${BUILD_FROM}

# Setup base
# hadolint ignore=DL3003
RUN \
    apk add --no-cache --virtual .build-dependencies \
      py3-pip=20.3.4-r1 \
      python3-dev=3.9.7-r4 \
    \
    && apk add --no-cache \
        git=2.34.2-r0 \
        nodejs=16.14.2-r0 \
        npm=8.1.3-r0 \
        python3=3.9.7-r4 \
        sqlite=3.36.0-r0 \
        iputils=20210722-r0 \
        util-linux

COPY rootfs /

RUN git clone https://github.com/louislam/uptime-kuma.git --branch 1.15.0 --depth 1

WORKDIR /uptime-kuma

RUN npm run setup

Many Thanks

🐻 Uptime-Kuma Version

1.15.0

💻 Operating System and Arch

Alpine Docker

🌐 Browser

Chrome

🐋 Docker Version

No response

🟩 NodeJS Version

16.14.2-r0

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
SwaggaRitzcommented, Apr 26, 2022

Yes that was it, thanks for the help

if [ ! -d /media/uptime-kuma ]; then
  mkdir /media/uptime-kuma
fi

rm -rf /uptime-kuma/data

ln -s /media/uptime-kuma /uptime-kuma/data

/usr/bin/node server/server.js
0reactions
louislamcommented, Apr 26, 2022

You can change it by DATA_DIR or --data-dir

https://github.com/louislam/uptime-kuma/wiki/Environment-Variables

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change MySQL data directory? - Stack Overflow
Stop MySQL using the following command: · Copy the existing data directory (default located in /var/lib/mysql ) using the following command: · edit...
Read more >
5.7.1 Setting Up Multiple Data Directories
Stop the existing MySQL instance using the data directory. · Copy the data directory to the location where the new data directory should...
Read more >
How To Move a MySQL Data Directory to a New Location on ...
MySQL has several ways to override configuration values. By default, the datadir is set to /var/lib/mysql in the /etc/mysql/mysql.conf.d/mysqld.
Read more >
How to Change MySQL Data directory location in Windows
How to Change MySQL Data directory location in Windows explains what steps you need to take to change the data directory for MySQL...
Read more >
How To Change Move Data Directory - YouTube
Try 30days Free Nextcloud Trial and add your own domain to:========https://bit.ly/3CGiKwQ========#Nextcloud #Nextclouders #tabdigitalGet ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found