1 of 10

Cara Mudah

Deployment

Golang

2 of 10

Golang Deployment

NandaRusfikri

3 of 10

Bagaimana Cara Deploy Golang ?

4 of 10

Tahap Deployment

  1. Build / Compile Golang
  2. Upload To Server
  3. Run Golang binary file

5 of 10

Infrastruktur

Server Linux

IP/Domain : localhost

Port :

6 of 10

Build / Compile Golang

SET GOOS=linux

go build - o nama_output main.go

7 of 10

Upload To Server

Access server with SFTP / SSH

Change permission file “ chmod -R 777 nama_file “

8 of 10

Syntak Run

Run

./nama_file

Run background Process

nohup ./nama_file > nama_file.log &

Check Process

ps aux | grep nama_file

Stop Process

kill -9 process_id

9 of 10

Infrastruktur

Server Linux

IP/Domain : localhost

Port :

10 of 10

Source

Source Code :

https://github.com/NandaRusfikri/vlog-golang-deploy/blob/main/README.md

Vidio :

https://www.youtube.com/watch?v=TFMNjShAboQ