This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 8764 default_server; | |
listen [::]:8764 default_server; | |
server_name _; | |
location / { | |
proxy_pass http://192.168.1.123; | |
proxy_set_header Host $http_host; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl daemon-reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=AutoSSH tunnel service to remote server on local port 8764 | |
After=network.target | |
[Service] | |
Environment="AUTOSSH_GATETIME=0" | |
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 20" -o "ServerAliveCountMax 3" -o "ConnectTimeout=1" -N -R 8764:127.0.0.1:8764 root@my.awesome-domain-name.com | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autossh -M 0 -o "ServerAliveInterval 20" -o "ServerAliveCountMax 3" -o "ConnectTimeout=1" -N -R 8764:127.0.0.1:8764 root@my.awesome-domain-name.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install autossh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
server_name my.awesome-domain-name.com; | |
gzip on; | |
gzip_comp_level 5; | |
location / { | |
proxy_pass http://localhost:8764; | |
proxy_set_header Host $http_host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl status nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update | |
sudo apt install nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.7" | |
services: | |
app: | |
image: node:14 | |
container_name: cryptowatcher | |
restart: always | |
volumes: | |
- ./app:/usr/src/app | |
- /app/node_modules | |
working_dir: /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# we create this container from a standard nodejs container | |
FROM node:14 | |
# we create the app directory, this will be our working directory | |
WORKDIR /usr/src/app | |
# we install the app dependencies | |
# A wildcard is used to ensure both package.json AND package-lock.json are copied | |
COPY app/package*.json ./ |