This file contains hidden or 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
root@759cc81a91f0:~ curl http://localhost:8080/erro | |
curl: (52) Empty reply from server |
This file contains hidden or 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 go build -o /usr/local/bin/api main.go | |
sudo supervisorctl restart api |
This file contains hidden or 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
cat /var/log/api.log | |
2018/11/28 23:22:12 main.go:28: 127.0.0.1:42282 GET / | |
2018/11/28 23:22:13 main.go:28: 127.0.0.1:42284 GET / | |
2018/11/28 23:22:14 main.go:28: 127.0.0.1:42286 GET / | |
2018/11/28 23:22:14 main.go:28: 127.0.0.1:42288 GET / | |
2018/11/28 23:22:14 main.go:28: 127.0.0.1:42290 GET / | |
2018/11/28 23:22:15 main.go:28: 127.0.0.1:42292 GET / | |
2018/11/28 23:22:17 main.go:28: 127.0.0.1:42294 GET / |
This file contains hidden or 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 supervisorctl stop api | |
sudo go build -o /usr/local/bin/api main.go | |
sudo supervisorctl start api |
This file contains hidden or 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
root@759cc81a91f0:~ sudo supervisorctl status | |
api RUNNING pid 3032, uptime 0:00:03 |
This file contains hidden or 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
ubuntu@7648e3e0ef2b:~ sudo supervisorctl reload | |
Restarted supervisord |
This file contains hidden or 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
[program:api] | |
directory=/usr/local | |
command=/usr/local/bin/api | |
autostart=true | |
autorestart=true | |
stderr_logfile=/var/log/api.err | |
stdout_logfile=/var/log/api.log | |
environment=CODENATION_ENV=prod |
This file contains hidden or 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 vim /etc/supervisor/conf.d/api.conf |
This file contains hidden or 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 go build -o /usr/local/bin/api main.go |
This file contains hidden or 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 supervisorctl status |