Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ tn-manage createsuperuser # `tn-manage` is the alias for `docker exec -it rs-lnd
```
docker compose -p lndtest --env-file env/stack-lndtn.env build
docker compose -p lndtest --env-file env/stack-lndtn.env up -d
docker exec -it rs-lndtn cp -R frontend/static/frontend /usr/src/static
docker exec -it rs-lndtn python3 manage.py createsuperuser
docker compose -p lndtest --env-file env/stack-lndtn.env restart
```
Expand Down
32 changes: 8 additions & 24 deletions compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@ services:
- ${BITCOIN_CONF:?}:${GUEST_BITCOIN:?}/bitcoin.conf

daphne:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
container_name: daphne${SUFFIX}
restart: always
network_mode: service:tor
env_file:
- ${ROBOSATS_ENVS_FILE}
environment:
SKIP_COLLECT_STATIC: "true"
depends_on:
- robosats
command: daphne -b 0.0.0.0 -p 9000 robosats.asgi:application
Expand All @@ -48,7 +46,7 @@ services:
network_mode: service:tor

robosats:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
container_name: rs${SUFFIX}
restart: always
environment:
Expand All @@ -57,8 +55,6 @@ services:
- ${ROBOSATS_ENVS_FILE}
depends_on:
- redis
volumes:
- ${STATIC}:/usr/src/static
network_mode: service:tor
command: gunicorn --bind :8000 --max-requests 1000 --max-requests-jitter 200 -w ${GUNICORN_WORKERS} robosats.wsgi:application

Expand All @@ -75,69 +71,58 @@ services:
- ${DATABASE}:/var/lib/postgresql/data

nginx:
image: nginx:${NGINX_TAG:-1.25.2-alpine-slim@sha256:1b0cb433e90260a96528c987ee78b797e842d510473935304a0931536d10f50d}
build: ./nginx
container_name: nginx${SUFFIX}
restart: always
volumes:
- ${STATIC}:/usr/src/static:ro
- ${NGINX_CONFD}:/etc/nginx/conf.d:ro
- ${WELLKNOWN}:/usr/src/.well-known:ro
network_mode: service:tor

clean-orders:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
restart: always
container_name: clord${SUFFIX}
command: python3 manage.py clean_orders
environment:
SKIP_COLLECT_STATIC: "true"
env_file:
- ${ROBOSATS_ENVS_FILE}
network_mode: service:tor

follow-invoices:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
container_name: invo${SUFFIX}
restart: always
env_file:
- ${ROBOSATS_ENVS_FILE}
environment:
SKIP_COLLECT_STATIC: "true"
command: python3 manage.py follow_invoices
network_mode: service:tor

telegram-watcher:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
container_name: tg${SUFFIX}
restart: always
environment:
SKIP_COLLECT_STATIC: "true"
env_file:
- ${ROBOSATS_ENVS_FILE}
command: python3 manage.py telegram_watcher
network_mode: service:tor

celery:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
container_name: cele${SUFFIX}
restart: always
env_file:
- ${ROBOSATS_ENVS_FILE}
environment:
SKIP_COLLECT_STATIC: "true"
command: celery -A robosats worker --loglevel=WARNING
depends_on:
- redis
network_mode: service:tor

celery-beat:
image: recksato/robosats:${ROBOSATS_TAG:-v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1}
image: recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f}
container_name: beat${SUFFIX}
restart: always
env_file:
- ${ROBOSATS_ENVS_FILE}
environment:
SKIP_COLLECT_STATIC: "true"
command: celery -A robosats beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
depends_on:
- redis
Expand Down Expand Up @@ -180,7 +165,6 @@ services:
- ${LND_DATA}:/running/lnd:ro
- ${LND_CONF}:/running/lnd/lnd.conf:ro
- ${LIT_DATA}:/running/lit:ro
- ${STATIC}:/running/static:ro
- ${BU_DIR1}:/backup1:rw
- ${BU_DIR2}:/backup2:rw
- ${BU_DIR3}:/backup3:rw
Expand Down
3 changes: 1 addition & 2 deletions compose/env-sample/clntn/compose.env
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# Uncomment the dockerhub tags to override the image versions localy without need to fork the docker-compose.yml

# ROBOSATS_TAG='v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1'
# ROBOSATS_TAG='v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f'
# BITCOIND_TAG='24.0.1-alpine@sha256:624b6fb1c282a3db6438ff35fbb9eed6ae260c66ffbb427ae72edd7da6a0ecdc'
# REDIS_TAG='7.2.1-alpine@sha256:7f5a0dfbf379db69dc78434091dce3220e251022e71dcdf36207928cbf9010de'
# NGINX_TAG='1.25.2-alpine-slim@sha256:1b0cb433e90260a96528c987ee78b797e842d510473935304a0931536d10f50d'
# POSTGRES_TAG='14.2-alpine@sha256:2fb5718f2a23dbac9bd1258e886eee90250a5903785e3136d62dd65e19f34982'

STATIC='/custom_path/testnet/static'
DATABASE='/custom_path/testnet/database'

# You can create a cronjob to create PG backups
Expand Down
3 changes: 1 addition & 2 deletions compose/env-sample/lndtn/compose.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Uncomment the dockerhub tags to override the image versions localy without need to fork the docker-compose.yml

# ROBOSATS_TAG='v0.6.0-alpha@sha256:8cc975ff5942a3fb2a09827b8eaafebea1c851eb3ecf9be1aaac1f238cfa9fc1'
# ROBOSATS_TAG='v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f'
# BITCOIND_TAG='24.0.1-alpine@sha256:624b6fb1c282a3db6438ff35fbb9eed6ae260c66ffbb427ae72edd7da6a0ecdc'
# REDIS_TAG='7.2.1-alpine@sha256:7f5a0dfbf379db69dc78434091dce3220e251022e71dcdf36207928cbf9010de'
# NGINX_TAG='1.25.2-alpine-slim@sha256:1b0cb433e90260a96528c987ee78b797e842d510473935304a0931536d10f50d'
Expand All @@ -10,7 +10,6 @@
# THUNDERHUB_TAG='v0.13.23@sha256:5ad834045dc3030ec199615827c415ca07729da32c4739afd3adfc662af4fe65'
# LIT_TAG='v0.11.0-alpha@sha256:dc14c495f699b14c2d75c43097ad3ab40e7287fc136a3203df9cffe17b867b71'

STATIC='/custom_path/testnet/static'
DATABASE='/custom_path/testnet/database'

# You can create a cronjob to create PG backups
Expand Down
5 changes: 5 additions & 0 deletions compose/nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM recksato/robosats:${ROBOSATS_TAG:-v0.8.4-alpha@sha256:e47f1225260d2508d4501af237714574dd467da4f735b6dce19d88bab41e744f} AS robosats

FROM nginx:${NGINX_TAG:-1.25.2-alpine-slim@sha256:1b0cb433e90260a96528c987ee78b797e842d510473935304a0931536d10f50d} AS nginx

COPY --from=robosats /usr/src/static /usr/src/static
3 changes: 3 additions & 0 deletions compose/nginx/mn.conf.d/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ server {
server_name robosats.com;
large_client_header_buffers 4 64k;

gzip_static on;
gzip_proxied expired no-cache no-store private auth;

location /static {
alias /usr/src/static;
}
Expand Down
3 changes: 3 additions & 0 deletions compose/nginx/tn.conf.d/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ server {
server_name satstralia.com;
large_client_header_buffers 4 64k;

gzip_static on;
gzip_proxied expired no-cache no-store private auth;

location /static {
alias /usr/src/static;
}
Expand Down
1 change: 0 additions & 1 deletion k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ kubectl exec -it -n testnet <gunicorn-pod-number> -- bash
python3 manage.py makemigrations control api chat
python3 manage.py migrate
python3 manage.py createsuperuser
python3 manage.py collectstatic
```

Warning django webserver will start up faster than postgres. Needs to be staged.
Expand Down
5 changes: 0 additions & 5 deletions k8s/base/daphne/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ spec:
ports:
- containerPort: 9000
volumeMounts:
- name: static-data
mountPath: /usr/src/static
- name: lnd-data
mountPath: /lnd
volumes:
- name: static-data
persistentVolumeClaim:
claimName: static-pvc
- name: lnd-data
persistentVolumeClaim:
claimName: lnd-pvc
6 changes: 0 additions & 6 deletions k8s/base/gunicorn/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,8 @@ spec:
ports:
- containerPort: 8000
volumeMounts:
- name: static-data
mountPath: /usr/src/static
- name: lnd-data
mountPath: /lnd
volumes:
- name: static-data
persistentVolumeClaim:
claimName: static-pvc
- name: lnd-data
persistentVolumeClaim:
claimName: lnd-pvc
1 change: 0 additions & 1 deletion k8s/base/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ resources:
- celery/worker-deployment.yml
- celery/beat-deployment.yml
# Nginx
- nginx/static-pvc.yml
- nginx/configmap.yml
- nginx/service.yml
- nginx/deployment.yml
Expand Down
6 changes: 0 additions & 6 deletions k8s/base/nginx/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,13 @@ spec:
cpu: "1m"
memory: "5Mi"
volumeMounts:
- name: static-data
mountPath: /usr/src/static
readOnly: true
- name: nginx-conf
mountPath: /etc/nginx/conf.d/local.conf
subPath: local.conf
- name: nginx-conf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
volumes:
- name: static-data
persistentVolumeClaim:
claimName: static-pvc
- name: nginx-conf
configMap:
name: nginx-configmap
13 changes: 0 additions & 13 deletions k8s/base/nginx/static-pvc.yml

This file was deleted.

3 changes: 3 additions & 0 deletions web/custom_nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ http {
sendfile on;
keepalive_timeout 65;

gzip_static on;
gzip_proxied expired no-cache no-store private auth;

server {

listen 80;
Expand Down