OS: Ubuntu 16.04 or CentOS 7
- Install docker
- Install cri_o or containerd
- Install kubelet, kubeadm, kubectl
| package main | |
| import ( | |
| "fmt" | |
| "fyne.io/fyne" | |
| "fyne.io/fyne/app" | |
| "fyne.io/fyne/dialog" | |
| "fyne.io/fyne/widget" | |
| ) |
OS: Ubuntu 16.04 or CentOS 7
Create template actions that's used to verify Go language pull requests before merging. It's easy to custom the flow, tools with your case.
Put pr_checker.yml or pr_checker_simple.yml to .github/workflows/ and see how it works with your pull requests. Make sure you are allows to use actions of Github.
References:
| # Docker postgres backup data | |
| docker exec -t -e PGPASSWORD={password} {container_name} pg_dump -U {username} --column-inserts --data-only --schema={schema} {database_name} > /path/to/exported/file.sql | |
| # Docker postgres run script from outside | |
| docker cp /host_path.sql captrondb:/container_inside.sql | |
| docker exec -u {login_user} {container_name} psql {database_name} {db_username} -f /container_inside.sql # with continer username | |
| docker exec {container_name} psql {database_name} {db_username} -f /container_inside.sql # without continer username |
| sudo bash -c "cat <<EOT > /etc/logrotate.d/api | |
| /opt/app/*.log { | |
| missingok | |
| notifempty | |
| compress | |
| size 10k | |
| daily | |
| copytruncate | |
| compress | |
| sharedscripts |
| sudo yum -y install yum-utils | |
| sudo yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional | |
| sudo yum install python2-certbot-nginx | |
| sudo certbot --nginx |
| # NGINX | |
| sudo yum install nginx; | |
| sudo setsebool -P httpd_can_network_connect 1; | |
| sudo bash -c "cat <<EOT > /etc/nginx/sites-enabled/default.conf | |
| server { | |
| server_name thuc.com.vn; | |
| listen 80; | |
| location / { | |
| proxy_pass http://localhost:8080; |
| # PLEASE REPLACE <username>, <public_key>, <admin_user> | |
| # Add new user with sudo admin | |
| useradd -m -d /home/<username> -s /bin/bash <username> | |
| mkdir -p '/home/<username>/.ssh/' | |
| touch /home/<username>/.ssh/authorized_keys | |
| echo -n "<public_key>" >> /home/<username>/.ssh/authorized_keys | |
| chown -R <username>:<username> /home/<username>/.ssh |
| # warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory | |
| sudo bash -c "cat <<EOT > /etc/environment | |
| LANG=en_US.utf-8 | |
| LC_ALL=en_US.utf-8 | |
| EOT" |
| sudo yum install java-1.8.0-openjdk | |
| mkdir /tmp/install_kafka | |
| cd /tmp/install_kafka | |
| curl http://www-eu.apache.org/dist/kafka/1.1.0/kafka_2.11-1.1.0.tgz --output kafka_2.11-1.1.0.tgz | |
| mkdir -p /opt/ | |
| cp /tmp/install_kafka/kafka_2.11-1.1.0.tgz /opt/kafka_2.11-1.1.0.tgz | |
| cd /opt/ | |
| tar -xzf kafka_2.11-1.1.0.tgz | |
| ln -s /opt/kafka_2.11-1.1.0 /opt/kafka | |
| cd /opt/kafka/ |