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ā
git clone https://github.com/Cloud-Integration-2021/lab2.git
cd lab2
| 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 |
$ go build -o lab2 && ./lab2
š You are all set!
Content type
Image
Digest
Size
12.2 MB
Last updated
almost 5 years ago
docker pull thomaslacaze/lab2