Recent Posts
Debian New System Useful Commands
Update System # switch to user root su - apt update && apt upgrade apt install sudo usermod -aG sudo rayed # logout from root & user Network Enable New Interface Ref: https://wiki.debian.org/NetworkConfiguration
sudo vi /etc/network/interfaces : auto enp0s8 iface enp0s8 inet dhcp : sudo ifup enp0s8 NTP sudo vi /etc/systemd/timesyncd.conf : NTP=sa.pool.ntp.org : sudo systemctl restart systemd-timesyncd timedatectl timesync-status Security Secure SSH sudo vi /etc/ssh/sshd_config : PasswordAuthentication no : sudo systemctl restart ssh Firewall Ref: https://wiki.
read more
Django and NGINX in Docker
In this post we will run Django application behind a NGINX webserver, which is a very common practice in production.
Build small Go Program Docker Image
Let’s start with this small Go program:
package main import "github.com/gin-gonic/gin" func main() { r := gin.Default() r.GET("/ping", func(c *gin.Context) { c.JSON(200, gin.H{ "message": "pong", }) }) r.Run() // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080") } We will use go modules to manage dependencies:
go mod init rayed.com/server go mod tidy You can run it without installing Go on your machine using Docker:
docker run --rm -it -v `pwd`:/app -w /app golang:1.
read more