This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:
- Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
- Windows 10 on my PC to work.
package br.com.triadworks.rponte.util; | |
import java.text.Normalizer; | |
public class StringUtils { | |
/** | |
* Remove toda a acentuação da string substituindo por caracteres simples sem acento. | |
*/ | |
public static String unaccent(String src) { |
This script will read your secret file and set each line as an env variable in your container.
I' assuming that you already has a entrypoint file in your Dockerfile. So now, you need to copy and paste the contents of set_env_secrets.sh to your entrypoint(you don't need the first line).
Now, you need to create a secret, the name could be whatever you like. I'm using the name of my application as a pattern for my secrets name. For this example, my secret name will be super-project and the content will be.
import com.amazonaws.ClientConfiguration; | |
import com.amazonaws.auth.AWSCredentialsProvider; | |
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagement; | |
import com.amazonaws.services.simplesystemsmanagement.AWSSimpleSystemsManagementClient; | |
import com.amazonaws.services.simplesystemsmanagement.model.*; | |
import org.apache.commons.lang3.tuple.ImmutablePair; | |
import org.apache.commons.lang3.tuple.Pair; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; |