mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-11-29 13:14:12 +00:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba9d3a8143 | |||
| bf59ec2fad | |||
| 5e010b29dd | |||
| 1de1d407a3 | |||
| 088eee39e1 | |||
| f179450e3b | |||
| f1a8fe9dbe | |||
| 63beff0bca | |||
| dd2be0946c | |||
| 9484e40815 | |||
| 9c1abb45a8 | |||
| c6286595b8 | |||
| 5a11bb7c58 | |||
| 036c931aef | |||
| 3a1137ca7a | |||
| 0706ff869e | |||
| ffc17824ec | |||
| abf05a2b21 | |||
| 541b651a41 | |||
| 0772eb3c39 | |||
| 5d9264494a | |||
| a59672bffc | |||
| 8b315c34b4 |
+6
-3
@@ -1,4 +1,4 @@
|
||||
FROM python:3-slim-bullseye as base
|
||||
FROM python:3.9-slim-bullseye as base
|
||||
|
||||
FROM base as builder
|
||||
|
||||
@@ -8,7 +8,7 @@ RUN apt-get update && apt-get -y install build-essential libssl-dev libffi-dev p
|
||||
mkdir /install
|
||||
WORKDIR /install
|
||||
COPY requirements.txt .
|
||||
RUN python -m pip install --prefix=/install --no-cache-dir --upgrade pip && \
|
||||
RUN python -m pip install --no-cache-dir --upgrade pip && \
|
||||
pip install --prefix=/install --no-cache-dir -r requirements.txt && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
apt-get clean
|
||||
@@ -19,7 +19,10 @@ COPY --from=builder /install /usr/local
|
||||
COPY app /app
|
||||
WORKDIR /app
|
||||
RUN apt-get update && \
|
||||
apt-get -y install iputils-ping nmap && \
|
||||
apt-get -y install iputils-ping nmap curl && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
HEALTHCHECK --interval=10s \
|
||||
CMD curl -fs "http://localhost:$DJANGO_PORT/health/" || exit 1
|
||||
|
||||
CMD ["./run.sh"]
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
|
||||
You can use the example [docker-compose.yml](docker-compose.yml) file and just run `docker-compose up -d`.
|
||||
|
||||
The website will be available at [localhost:8000](http://localhost:8000). If you run it on a different pc, it will be `http://<your-ip>:8000`. You can change the port in the docker-compose file.
|
||||
|
||||
## 🔧 Available Env Vars
|
||||
|
||||
| env var | type | info |
|
||||
@@ -52,3 +54,4 @@ You can use the example [docker-compose.yml](docker-compose.yml) file and just r
|
||||
## 📝 Other infos
|
||||
|
||||
* The django container needs to run in host network mode to send the wakeonlan command on your local network. Therefore all other containers also need to run in host network mode. I don't like it but there is no way around.
|
||||
* Firefox 92 and below: The datetime picker for wake events will be available with version 93 and above. [see here](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local#browser_compatibility)
|
||||
|
||||
@@ -142,4 +142,4 @@ STATIC_URL = '/static/'
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
|
||||
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
|
||||
|
||||
VERSION = "v1.0.0"
|
||||
VERSION = "v1.1.0"
|
||||
|
||||
+11
-1
@@ -10,13 +10,23 @@ if [ -n "$DJANGO_SUPERUSER_USER" ] && [ -n "$DJANGO_SUPERUSER_PASSWORD" ]; then
|
||||
fi
|
||||
|
||||
# set visitors to 0
|
||||
python -u manage.py shell -c "from wol.models import Websocket; [i.delete() for i in Websocket.objects.all()]; Websocket.objects.create(visitors=0)"
|
||||
python -u manage.py shell -c "from wol.models import Websocket; [i.delete() for i in Websocket.objects.all()]; Websocket.objects.create(visitors=0)"
|
||||
|
||||
# set notifications
|
||||
if [ -n "$ENABLE_NOTIFICATIONS" ]; then
|
||||
python -u manage.py shell -c "from wol.models import Settings; Settings.objects.update_or_create(id=1, defaults={'enable_notifications': '$ENABLE_NOTIFICATIONS'})"
|
||||
fi
|
||||
|
||||
# set ping interval
|
||||
if [ -z "$PING_INTERVAL" ]; then
|
||||
PING_INTERVAL=5
|
||||
elif [ "$PING_INTERVAL" -lt 5 ]; then
|
||||
echo ""
|
||||
echo "Ping interval lower than 5 seconds is not recommended. Please use an interval of 5 seconds or higher. Automatically set to 5 seconds."
|
||||
echo ""
|
||||
PING_INTERVAL=5
|
||||
fi
|
||||
|
||||
celery -A django_wol worker &
|
||||
celery -A django_wol beat &
|
||||
gunicorn --bind 0.0.0.0:"$DJANGO_PORT" --workers 4 django_wol.asgi:application -k uvicorn.workers.UvicornWorker
|
||||
|
||||
@@ -11,3 +11,9 @@ class SettingsForm(forms.Form):
|
||||
console = forms.CharField(widget=forms.RadioSelect, label="console")
|
||||
sort = forms.ChoiceField(choices=[("name", "name"), ("ip", "ip")], widget=forms.RadioSelect, label="sort")
|
||||
ip_range = forms.CharField(label="ip_range")
|
||||
|
||||
|
||||
class AddCustomDevice(forms.Form):
|
||||
custom_add_name = forms.CharField(label="custom_add_name")
|
||||
custom_add_ip = forms.CharField(label="custom_add_ip")
|
||||
custom_add_mac = forms.CharField(label="custom_add_mac")
|
||||
|
||||
@@ -295,15 +295,15 @@ socket.onmessage = function (event) {
|
||||
|
||||
// set wake by client
|
||||
if ("wake" in message) {
|
||||
document.getElementById(message.wake.id + "-btn-wake").classList.add("is-loading");
|
||||
document.querySelector(`[id="btn-wake"][data-id="${message.wake.id}"]`).classList.add("is-loading");
|
||||
if (enableNotifications) {
|
||||
notif.show("Wake started", message.wake.name + " has been started.", "is-info", 5000);
|
||||
notif.show("Wake started", "Wake command for " + message.wake.name + " has been sent.", "is-info", 5000);
|
||||
}
|
||||
}
|
||||
|
||||
// set wake by schedule
|
||||
if ("wake_schedule" in message) {
|
||||
document.getElementById(message.wake_schedule.id + "-btn-wake").classList.add("is-loading");
|
||||
document.querySelector(`[id="btn-wake"][data-id="${message.wake_schedule.id}"]`).classList.add("is-loading");
|
||||
document.getElementById(message.wake_schedule.id + "-schedule-notice").innerHTML = "";
|
||||
if (enableNotifications) {
|
||||
notif.show("Scheduled wake started", message.wake_schedule.name + " has been started.", "is-info", 5000);
|
||||
|
||||
@@ -66,7 +66,7 @@ async function scan() {
|
||||
|
||||
function add_device(data) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
var url = "/settings/add/";
|
||||
var url = "/settings/scan_add/";
|
||||
xhr.open("POST", url, true);
|
||||
xhr.setRequestHeader("Content-Type", "application/json");
|
||||
xhr.send(data);
|
||||
|
||||
@@ -40,18 +40,14 @@
|
||||
</nav>
|
||||
<div class="container">
|
||||
<section class="section">
|
||||
<h1 class="title is-size-2">
|
||||
Settings
|
||||
</h1>
|
||||
<p class="subtitle">
|
||||
UpSnap
|
||||
</p>
|
||||
<h1 class="title is-size-2">Settings</h1>
|
||||
<p class="subtitle">UpSnap</p>
|
||||
</section>
|
||||
<section class="section pt-4 pb-3">
|
||||
<section class="section py-3">
|
||||
<h2 class="title is-size-3 my-5">General</h2>
|
||||
<form action="/settings/save/" method="post">
|
||||
{% csrf_token %}
|
||||
<div class="box no-flex">
|
||||
<h2 class="title is-size-3 mb-4">General</h2>
|
||||
<div class="columns">
|
||||
<div class="column is-one-quarter">
|
||||
<span class="mr-2"><strong>Notifications:</strong></span>
|
||||
@@ -116,65 +112,115 @@
|
||||
</form>
|
||||
</section>
|
||||
<section class="section py-3">
|
||||
<div class="columns is-multiline is-mobile">
|
||||
<div class="column is-full-mobile is-full-tablet is-full-desktop is-full-widescreen is-half-fullhd">
|
||||
<div class="box no-flex">
|
||||
<h2 class="title is-size-3 mb-4">Add devices</h2>
|
||||
{% if settings.scan_address %}
|
||||
<button id="scan-button" class="button is-primary">Scan network</button>
|
||||
{% else %}
|
||||
<article class="message is-danger">
|
||||
<div class="message-body">
|
||||
Please enter the network address above and save to use this feature. Network address should look like "192.168.1.0/24".
|
||||
</div>
|
||||
</article>
|
||||
<button id="scan-button" class="button is-primary" disabled>Scan network</button>
|
||||
{% endif %}
|
||||
<div id="scan-table-container" class="table-container py-3 is-hidden">
|
||||
<table id="scan-table" class="table is-fullwidth">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>IP</th>
|
||||
<th>MAC</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="title is-size-3 my-5">Manage Devices</h2>
|
||||
<div class="box no-flex">
|
||||
<h3 class="title is-size-4 mb-5">Scan network</h3>
|
||||
{% if settings.scan_address %}
|
||||
<button id="scan-button" class="button is-primary">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-network-wired"></i>
|
||||
</span>
|
||||
<span>
|
||||
Scan
|
||||
</span>
|
||||
</button>
|
||||
{% else %}
|
||||
<article class="message is-danger">
|
||||
<div class="message-body">
|
||||
Please enter the network address above and save to use this feature. Network address should look like "192.168.1.0/24".
|
||||
</div>
|
||||
</article>
|
||||
<button id="scan-button" class="button is-primary" disabled>Scan network</button>
|
||||
{% endif %}
|
||||
<h3 class="title is-size-4 my-5">Add custom</h3>
|
||||
<form action="/settings/custom_add/" method="post">
|
||||
{% csrf_token %}
|
||||
<table class="table is-fullwidth">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>IP</th>
|
||||
<th>MAC</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td><input type="text" class="input" name="custom_add_name"></td>
|
||||
<td><input type="text" class="input" name="custom_add_ip"></td>
|
||||
<td><input type="text" class="input" name="custom_add_mac"></td>
|
||||
<td class="is-vcentered">
|
||||
<button id="btn-custom-add" class="button is-primary is-small" type="submit">Add</button>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<div id="scan-table-container" class="table-container is-hidden">
|
||||
<table id="scan-table" class="table is-fullwidth">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>IP</th>
|
||||
<th>MAC</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="column is-full-mobile is-full-tablet is-full-desktop is-full-widescreen is-half-fullhd">
|
||||
<div class="box no-flex">
|
||||
<h2 class="title is-size-3 mb-4">Delete devices</h2>
|
||||
<div id="delete-table-container" class="table-container py-3">
|
||||
<table id="delete-table" class="table is-fullwidth">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>IP</th>
|
||||
<th>MAC</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dev in devices %}
|
||||
<tr>
|
||||
<td>{{ dev.name }}</td>
|
||||
<td>{{ dev.ip }}</td>
|
||||
<td>{{ dev.mac }}</td>
|
||||
<td><button id="delete-button" class="button is-danger is-small" data-id="{{ dev.id }}">Delete</button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="title is-size-4 my-5">Delete devices</h3>
|
||||
<div id="delete-table-container" class="table-container">
|
||||
<table id="delete-table" class="table is-fullwidth">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>IP</th>
|
||||
<th>MAC</th>
|
||||
<th>Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for dev in devices %}
|
||||
<tr>
|
||||
<td>{{ dev.name }}</td>
|
||||
<td>{{ dev.ip }}</td>
|
||||
<td>{{ dev.mac }}</td>
|
||||
<td><button id="delete-button" class="button is-danger is-small" data-id="{{ dev.id }}">Delete</button></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<h3 class="title is-size-4 my-5">Backup / Restore</h3>
|
||||
<div class="columns is-tablet">
|
||||
<div class="column is-narrow">
|
||||
<a class="button is-primary" href="/settings/export/">
|
||||
<span class="icon is-small">
|
||||
<i class="fas fa-download"></i>
|
||||
</span>
|
||||
<span>Backup devices</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="column is-narrow">
|
||||
<form action="/settings/import/" method="post" enctype=multipart/form-data id="restore-form">
|
||||
{% csrf_token %}
|
||||
<div class="file is-primary">
|
||||
<label class="file-label">
|
||||
<input id="restore-input" class="file-input" type="file" name="file" onchange="form.submit()">
|
||||
<span class="file-cta">
|
||||
<span class="file-icon">
|
||||
<i class="fas fa-upload"></i>
|
||||
</span>
|
||||
<span class="file-label">
|
||||
Restore from file…
|
||||
</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section py-3">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<h2 class="title is-size-3 mb-4">App info</h2>
|
||||
<h2 class="title is-size-3 my-5">Info</h2>
|
||||
<div class="box no-flex">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h3 class="title is-size-4 mb-5">App</h3>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<span class="mr-2"><strong>App version:</strong></span>
|
||||
@@ -216,10 +262,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<h2 class="title is-size-3 mb-4">System info</h2>
|
||||
<div class="column">
|
||||
<h3 class="title is-size-4 mb-5">System</h3>
|
||||
<div class="columns is-mobile">
|
||||
<div class="column">
|
||||
<span class="mr-2"><strong>System:</strong></span>
|
||||
@@ -259,7 +303,7 @@
|
||||
<div class="column">
|
||||
<p>{{ platform.machine }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+6
-2
@@ -7,6 +7,10 @@ urlpatterns = [
|
||||
path("settings/", views.settings, name="settings"),
|
||||
path("settings/save/", views.settings_save, name="settings_save"),
|
||||
path("settings/scan/", views.settings_scan, name="settings_scan"),
|
||||
path("settings/add/", views.settings_add, name="settings_add"),
|
||||
path("settings/del/", views.settings_del, name="settings_del")
|
||||
path("settings/scan_add/", views.settings_scan_add, name="settings_scan_add"),
|
||||
path("settings/custom_add/", views.settings_custom_add, name="settings_custom_add"),
|
||||
path("settings/del/", views.settings_del, name="settings_del"),
|
||||
path("settings/export/", views.settings_export, name="settings_export"),
|
||||
path("settings/import/", views.settings_import, name="settings_import"),
|
||||
path("health/", views.health, name="health")
|
||||
]
|
||||
|
||||
+70
-9
@@ -2,17 +2,21 @@ import json
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
from io import StringIO
|
||||
|
||||
from asgiref.sync import async_to_sync
|
||||
from channels.layers import get_channel_layer
|
||||
from django.core import serializers
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.http.response import JsonResponse
|
||||
from django.http.response import (HttpResponse, HttpResponseServerError,
|
||||
JsonResponse)
|
||||
from django.shortcuts import render
|
||||
from django.utils import dateformat, timezone
|
||||
from django.utils.decorators import method_decorator
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django_wol.settings import VERSION as app_version
|
||||
|
||||
from .forms import SettingsForm
|
||||
from .forms import AddCustomDevice, SettingsForm
|
||||
from .models import Device, Settings, Websocket
|
||||
|
||||
|
||||
@@ -61,7 +65,7 @@ def settings_save(request):
|
||||
"scan_address": form.cleaned_data["ip_range"]
|
||||
}
|
||||
)
|
||||
return HttpResponseRedirect('/settings/')
|
||||
return HttpResponseRedirect("/settings/")
|
||||
|
||||
|
||||
def settings_scan(request):
|
||||
@@ -74,7 +78,8 @@ def settings_scan(request):
|
||||
if not conf.scan_address:
|
||||
return JsonResponse(data=data)
|
||||
|
||||
p = subprocess.Popen(["nmap", "-sP", conf.scan_address], stdout=subprocess.PIPE)
|
||||
p = subprocess.Popen(
|
||||
["nmap", "-sP", conf.scan_address], stdout=subprocess.PIPE)
|
||||
out = p.communicate()[0].decode("utf-8")
|
||||
ip_line = "Nmap scan report for"
|
||||
mac_line = "MAC Address:"
|
||||
@@ -89,11 +94,11 @@ def settings_scan(request):
|
||||
ip = ip.replace(")", "")
|
||||
else:
|
||||
name = "Unknown"
|
||||
ip = line_splitted[4]
|
||||
ip = line_splitted[4]
|
||||
elif line.startswith(mac_line):
|
||||
line_splitted = line.split()
|
||||
mac = line_splitted[2]
|
||||
|
||||
|
||||
data["devices"].append({
|
||||
"name": name,
|
||||
"ip": ip,
|
||||
@@ -103,11 +108,25 @@ def settings_scan(request):
|
||||
return JsonResponse(data=data)
|
||||
|
||||
|
||||
def settings_custom_add(request):
|
||||
if request.method == "POST":
|
||||
form = AddCustomDevice(request.POST)
|
||||
if form.is_valid():
|
||||
Device.objects.update_or_create(
|
||||
mac=form.cleaned_data["custom_add_mac"],
|
||||
defaults={
|
||||
"name": form.cleaned_data["custom_add_name"],
|
||||
"ip": form.cleaned_data["custom_add_ip"]
|
||||
}
|
||||
)
|
||||
return HttpResponseRedirect("/settings/")
|
||||
|
||||
|
||||
@method_decorator(csrf_exempt, name="dispatch")
|
||||
def settings_add(request):
|
||||
def settings_scan_add(request):
|
||||
data = {}
|
||||
if request.method == "POST":
|
||||
post_body = json.loads(request.body.decode('utf-8'))
|
||||
post_body = json.loads(request.body.decode("utf-8"))
|
||||
if post_body["name"] == "":
|
||||
name = "Unknown"
|
||||
else:
|
||||
@@ -131,11 +150,12 @@ def settings_add(request):
|
||||
|
||||
return JsonResponse(data=data)
|
||||
|
||||
|
||||
@method_decorator(csrf_exempt, name="dispatch")
|
||||
def settings_del(request):
|
||||
data = {}
|
||||
if request.method == "POST":
|
||||
dev_id = int(request.body.decode('utf-8'))
|
||||
dev_id = int(request.body.decode("utf-8"))
|
||||
Device.objects.get(id=dev_id).delete()
|
||||
data["status"] = 200
|
||||
else:
|
||||
@@ -148,3 +168,44 @@ def settings_del(request):
|
||||
})})
|
||||
|
||||
return JsonResponse(data=data)
|
||||
|
||||
|
||||
def settings_export(request):
|
||||
if request.method == "GET":
|
||||
file_data = {}
|
||||
data = serializers.serialize("python", Device.objects.all())
|
||||
for dev in data:
|
||||
file_data[dev["fields"]["mac"]] = {
|
||||
"name": dev["fields"]["name"],
|
||||
"ip": dev["fields"]["ip"],
|
||||
"netmask": dev["fields"]["netmask"]
|
||||
}
|
||||
now = dateformat.format(timezone.now(), "Y-m-d_H-i-s")
|
||||
response = HttpResponse(
|
||||
StringIO(json.dumps(file_data, indent=4)), content_type="application/json")
|
||||
response["Content-Disposition"] = f"attachment;filename=upsnap_backup_{now}.json"
|
||||
return response
|
||||
return HttpResponseRedirect("/settings/")
|
||||
|
||||
|
||||
def settings_import(request):
|
||||
if request.method == "POST":
|
||||
data = json.loads(request.FILES["file"].read())
|
||||
for key, value in data.items():
|
||||
Device.objects.update_or_create(
|
||||
mac=key,
|
||||
defaults={
|
||||
"name": value["name"],
|
||||
"ip": value["ip"],
|
||||
"netmask": value["netmask"],
|
||||
}
|
||||
)
|
||||
return HttpResponseRedirect("/settings/")
|
||||
|
||||
|
||||
def health(request):
|
||||
try:
|
||||
Settings.objects.all()
|
||||
return HttpResponse("Ok")
|
||||
except Exception:
|
||||
return HttpResponseServerError("db: cannot connect to database.")
|
||||
|
||||
+12
-6
@@ -4,10 +4,7 @@ services:
|
||||
container_name: upsnap_django
|
||||
image: seriousm4x/upsnap:latest
|
||||
network_mode: host
|
||||
depends_on:
|
||||
- upsnap_redis
|
||||
- upsnap_postgres
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- DJANGO_SUPERUSER_USER=admin
|
||||
- DJANGO_SUPERUSER_PASSWORD=admin
|
||||
@@ -21,20 +18,29 @@ services:
|
||||
- POSTGRES_PASSWORD=upsnap
|
||||
- PING_INTERVAL=5
|
||||
- ENABLE_NOTIFICATIONS=True
|
||||
depends_on:
|
||||
- upsnap_redis
|
||||
- upsnap_postgres
|
||||
upsnap_redis:
|
||||
container_name: upsnap_redis
|
||||
image: redis:6
|
||||
network_mode: host
|
||||
restart: always
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: redis-cli ping
|
||||
interval: 10s
|
||||
upsnap_postgres:
|
||||
container_name: upsnap_postgres
|
||||
image: postgres:13-alpine
|
||||
restart: always
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- "POSTGRES_USER=upsnap"
|
||||
- "POSTGRES_PASSWORD=upsnap"
|
||||
- "POSTGRES_DB=upsnap"
|
||||
healthcheck:
|
||||
test: pg_isready -U upsnap
|
||||
interval: 10s
|
||||
volumes:
|
||||
- upsnap_db:/var/lib/postgresql/data
|
||||
volumes:
|
||||
|
||||
Reference in New Issue
Block a user