Use mountable database folder
This commit is contained in:
parent
d57ea27ba3
commit
c489f354c5
|
@ -227,3 +227,5 @@ typings/
|
||||||
/static
|
/static
|
||||||
# Build output, etc.
|
# Build output, etc.
|
||||||
/tmp
|
/tmp
|
||||||
|
# Database file
|
||||||
|
/data
|
||||||
|
|
|
@ -18,5 +18,22 @@
|
||||||
</library>
|
</library>
|
||||||
</libraries>
|
</libraries>
|
||||||
</data-source>
|
</data-source>
|
||||||
|
<data-source source="LOCAL" name="db [2]" uuid="037e6f47-0871-42e5-8f52-6fdef1f306f2">
|
||||||
|
<driver-ref>sqlite.xerial</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/data/db.sqlite3</jdbc-url>
|
||||||
|
<driver-properties>
|
||||||
|
<property name="enable_load_extension" value="true" />
|
||||||
|
</driver-properties>
|
||||||
|
<libraries>
|
||||||
|
<library>
|
||||||
|
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.25.1/sqlite-jdbc-3.25.1.jar</url>
|
||||||
|
</library>
|
||||||
|
<library>
|
||||||
|
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.25.1/license.txt</url>
|
||||||
|
</library>
|
||||||
|
</libraries>
|
||||||
|
</data-source>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -20,6 +20,9 @@ COPY uwsgi.ini .
|
||||||
COPY bootstrap.sh .
|
COPY bootstrap.sh .
|
||||||
RUN ["chmod", "+x", "./bootstrap.sh"]
|
RUN ["chmod", "+x", "./bootstrap.sh"]
|
||||||
|
|
||||||
|
# Create data folder
|
||||||
|
RUN ["mkdir", "data"]
|
||||||
|
|
||||||
EXPOSE 9090
|
EXPOSE 9090
|
||||||
|
|
||||||
# Start uwsgi server
|
# Start uwsgi server
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
./build-static.sh
|
./build-static.sh
|
||||||
#docker build -t sissbruecker/linkding .
|
docker build -t sissbruecker/linkding .
|
||||||
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t sissbruecker/linkding:latest --push .
|
#docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t sissbruecker/linkding:latest --push .
|
||||||
|
|
|
@ -76,7 +76,7 @@ WSGI_APPLICATION = 'siteroot.wsgi.application'
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
'NAME': os.path.join(BASE_DIR, 'data', 'db.sqlite3'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue