Golang API Rest for lab3
# Run the container
$ docker run \
-v /etc/localtime:/etc/localtime:ro \
-e "ENV=dev" \
-e "DB_HOST=localhost" \
-e "DB_PORT=5432" \
-e "DB_USER=postgres" \
-e "DB_PASSWORD=postgres" \
-e "DB_NAME=postgres" \
--restart always \
--name lab2 \
-p 8081:8081 \
thomaslacaze/lab2
See here
- NodeJS, yarn.
- Clone the repository
git clone https://github.com/Cloud-Integration-2021/lab2.git
- Change the working directory
cd lab2
- Setup environnement variables
Environment Variable | Default | Description |
---|---|---|
ENV |
dev |
Whether to use development or production settings |
DB_HOST |
localhost |
Hostname of the postgres server |
DB_PORT |
5432 |
Port of the postgres server |
DB_USER |
postgres |
Username to connect to the postgres server |
DB_PASSWORD |
postgres |
Password to connect to the postgres server |
DB_NAME |
postgres |
Name of the database |
- Run the app
$ go build -o lab2 && ./lab2
🌟 You are all set!