Skip to content

Commit 63ee9fd

Browse files
authored
Merge pull request #129 from ScanOC/django3
Upgrade to v0.1.2
2 parents cb22634 + d447c78 commit 63ee9fd

29 files changed

+656
-292
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ trunk_player/supervisor.conf
2626
daphne.lock
2727
*.log*
2828
running.pid
29+
.vscode/settings.json

Dockerfile

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,32 @@
1-
FROM dreinhold/base-django:1.1
2-
1+
FROM python:3.10
2+
RUN apt-get update && \
3+
apt-get -y install nginx redis-server ssl-cert tzdata && \
4+
rm -rf /var/lib/apt/lists/*
35

46
RUN mkdir -p /app/trunkplayer
5-
# set work directory
67
WORKDIR /app/trunkplayer
78

89
# set environment variables
910
ENV PYTHONDONTWRITEBYTECODE 1
1011
ENV PYTHONUNBUFFERED 1
1112

13+
# install dependencies
14+
ADD requirements.txt /app/trunkplayer
15+
RUN pip install --upgrade pip && pip install -r requirements.txt
16+
17+
RUN mkdir -p /var/log/trunk-player/
18+
19+
# Make SSL
20+
RUN make-ssl-cert generate-default-snakeoil --force-overwrite
21+
1222
# copy project
1323
#COPY . .
1424
ADD . /app/trunkplayer
1525
RUN rm -f /etc/nginx/sites-enabled/default
1626
COPY trunk_player/trunk_player.nginx.docker /etc/nginx/conf.d/nginx.conf
1727

18-
# install dependencies
19-
RUN pip install --upgrade pip && pip install -r requirements.txt
28+
EXPOSE 80
29+
EXPOSE 443
2030

2131
ENTRYPOINT ["./entrypoint.sh"]
2232

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Trunk Player
22
============
33

4+
### Version 0.1.2
5+
46
Python Django web frontend for playing recorded radio transmisisons. The audio files are recorded using [Trunk Recoder](https://github.com/robotastic/trunk-recorder).
57

68
![Main Screen](/../master/docs/images/trunk_player_main.png?raw=true "Main Screen")
@@ -21,3 +23,6 @@ Check out https://github.com/MaxwellDPS/Unibridge for using Trunk-Player with un
2123

2224
## WIP
2325
- The code still has a lot of work. If you have issues or question feel free to post in the google group.
26+
27+
## Discuss
28+
- Join our [gitter](https://gitter.im/TrunkPlayer/Lobby)

docker-compose.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,49 @@ services:
44
db:
55
image: postgres
66
environment:
7+
- POSTGRES_DB=tr
8+
- POSTGRES_USER=postgres
79
- POSTGRES_PASSWORD=password1234
810

911
app:
1012
build:
1113
context: .
14+
#image: maxwelldps/trunk-player:latest
1215
ports:
13-
- "80:80"
16+
- 80:80
17+
- 8443:443
1418
volumes:
15-
- .:/app/trunkplayer
16-
# command:
17-
# entrypoint: sh -c "python manage.py runserver 0.0.0.0:8000"
19+
#- .:/app/trunkplayer
20+
- audio:/app/trunkplayer/audio_files
1821
environment:
19-
- DEBUG=0
22+
- DEBUG=True
2023
- SQL_ENGINE=django.db.backends.postgresql_psycopg2
2124
- SQL_DATABASE=tr
2225
- SQL_USER=postgres
2326
- SQL_PASSWORD=password1234
2427
- SQL_HOST=db
28+
- REDIS_URL=redis://127.0.0.1:6379
2529
- MIGRATE_DB=1
30+
- SECRET_KEY="%2%xjx4c3obf_xa8hsdbd@ci+8!4)@x16_!auo*h(%*p_z(g"
31+
- DJANGO_ALLOWED_HOSTS=*
32+
- TZ=America/Chicago
33+
- FORCE_SECURE=False
34+
- ANONYMOUS_TIME=0
35+
- SITE_TITLE=TESTING
36+
37+
- AUDIO_URL_BASE=/audio/
38+
- ALLOW_ANONYMOUS=False
39+
- ACCESS_TG_RESTRICT=False
40+
- TALKGROUP_RECENT_LENGTH=0
41+
- OPEN_SITE=False
42+
- ALLOW_GOOGLE_SIGNIN=False
43+
- FIX_AUDIO_NAME=False
44+
- TRANS_DATETIME_FORMAT=%H:%M:%S %m/%d/%Y
45+
- GOOGLE_ANALYTICS_PROPERTY_ID=0
46+
- USE_RAW_ID_FIELDS=False
47+
2648
depends_on:
2749
- db
2850

51+
volumes:
52+
audio:

docs/config_local.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Now start atleast 1 runworker
9393

9494
.. code-block:: console
9595
96-
$ ./manage.py runworker
96+
$ ./manage.py runworker livecall-scan-default
9797
9898
Adding new transmissions
9999
========================

docs/index.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Welcome to Trunk Player's documentation!
99
Contents:
1010

1111
.. toctree::
12-
:maxdepth: 2
12+
:maxdepth: 4
1313

1414
install
1515
configure
@@ -19,6 +19,10 @@ Contents:
1919
settings
2020
supervisor
2121

22+
Upgrades
23+
========
24+
.. toctree::
25+
upgrade/upgrade-0.1.2.rst
2226

2327

2428
Indices and tables

docs/settings.rst

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,7 @@ SITE_ID
246246

247247
[D] ID of this site
248248

249-
PINAX_STRIPE_SECRET_KEY
250-
=======================
251-
252-
[D3] If using payment plans, stripe key
253-
254-
PINAX_STRIPE_PUBLIC_KEY
255-
=======================
256-
257-
[D3] If using payment plans, stripe key
258-
259-
PINAX_STRIPE_INVOICE_FROM_EMAIL
260-
===============================
249+
USE_RAW_ID_FIELDS
250+
=================
261251

262-
[D3] If using payment plans, email the invoice will be sent from
252+
[D] For very large systems, the admin page may load better with raw id fields

0 commit comments

Comments
 (0)