|
|
@ -1,6 +1,34 @@ |
|
|
|
# py-push-server |
|
|
|
|
|
|
|
## Docker Compose Setup |
|
|
|
## Docker Build & Deploy |
|
|
|
|
|
|
|
``` |
|
|
|
export PUSH_SERVER_VERSION=0.1 |
|
|
|
|
|
|
|
# also in build.sh |
|
|
|
docker build --tag py-push-server:amd-$PUSH_SERVER_VERSION --platform linux/amd64 . |
|
|
|
|
|
|
|
docker save -o ~/dl/py-push-server-amd-$PUSH_SERVER_VERSION.tar py-push-server:amd-$PUSH_SERVER_VERSION |
|
|
|
|
|
|
|
bzip2 ~/dl/py-push-server-amd-$PUSH_SERVER_VERSION.tar |
|
|
|
``` |
|
|
|
|
|
|
|
... and then on the server after transferring that file: |
|
|
|
|
|
|
|
``` |
|
|
|
export PUSH_SERVER_VERSION=0.1 |
|
|
|
|
|
|
|
bzip2 -d py-push-server-amd-$PUSH_SERVER_VERSION.tar.bz2 |
|
|
|
|
|
|
|
sudo docker load -i py-push-server-amd-$PUSH_SERVER_VERSION.tar |
|
|
|
|
|
|
|
sudo docker run -d -p 8900:3000 -v ~/py-push-server-db:/app/instance/data --name py-push-server-$PUSH_SERVER_VERSION py-push-server:amd-$PUSH_SERVER_VERSION |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Docker Compose & HAProxy Setup |
|
|
|
|
|
|
|
|
|
|
|
On first run you need to: |
|
|
@ -8,7 +36,7 @@ On first run you need to: |
|
|
|
`docker network create phoenix-network` |
|
|
|
|
|
|
|
|
|
|
|
## HAProxy setup |
|
|
|
### HAProxy setup |
|
|
|
|
|
|
|
... in docker-compose.yml ... |
|
|
|
|
|
|
@ -181,7 +209,7 @@ NOTE: `timesafari-pwa.anomalistlabs.com` PWA sits on the root |
|
|
|
timesafari-pwa.anomalistlabs.com/web-push/ web_push_backend |
|
|
|
``` |
|
|
|
|
|
|
|
## The rest .. |
|
|
|
### The rest .. |
|
|
|
|
|
|
|
`docker-compose up -d` should just work :-) |
|
|
|
|
|
|
@ -192,11 +220,6 @@ timesafari-pwa.anomalistlabs.com/web-push/ web_push_backend |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Run the server outside Docker |
|
|
|
|
|
|
|
Run the app: |
|
|
|