Sign inSign up

thomaslacaze/lab2

By thomaslacaze

•Updated almost 5 years ago

Image
0

317

thomaslacaze/lab2 repository overview

⁠Cloud-Integration - Lab 2

Golang API Rest for lab3

ā šŸ› ļø Installation Steps

⁠🐳 Option 1: Run from Docker run
# 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
⁠🐳 Option 2: Run from Docker-compose

See here⁠

ā šŸ’» Option 3: Run from source
⁠Prerequisites
  • NodeJS, yarn.
  1. Clone the repository
git clone https://github.com/Cloud-Integration-2021/lab2.git
  1. Change the working directory
cd lab2
  1. Setup environnement variables
Environment VariableDefaultDescription
ENVdevWhether to use development or production settings
DB_HOSTlocalhostHostname of the postgres server
DB_PORT5432Port of the postgres server
DB_USERpostgresUsername to connect to the postgres server
DB_PASSWORDpostgresPassword to connect to the postgres server
DB_NAMEpostgresName of the database
  1. Run the app
$ go build -o lab2 && ./lab2

🌟 You are all set!

⁠Dockerfile

Dockerfile⁠

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

Size

12.2 MB

Last updated

almost 5 years ago

docker pull thomaslacaze/lab2