Compare commits
No commits in common. "712651c39b183c33329a734592bd4390f275338e" and "983bb26c9d336300c750e8de46e85744ff935951" have entirely different histories.
712651c39b
...
983bb26c9d
3 changed files with 4 additions and 11 deletions
|
@ -1,11 +1,7 @@
|
|||
# Court - A URL Shortener
|
||||
|
||||
Only based on go standard library and PostGres
|
||||
|
||||
## How to run it
|
||||
|
||||
`docker compose up -d`, by default it will expose port 8000
|
||||
|
||||
## How to manage it
|
||||
|
||||
There is a webui on the `/webui` endpoint, it's the only reserved path (with the `/`)
|
||||
*PS: if it fail miserably, relaunch it, it's due to PostGres being long to startup*
|
||||
|
|
|
@ -8,8 +8,6 @@ services:
|
|||
POSTGRES_DB: court
|
||||
volumes:
|
||||
- ./initdb/:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready"]
|
||||
court:
|
||||
build: .
|
||||
ports:
|
||||
|
@ -17,5 +15,4 @@ services:
|
|||
environment:
|
||||
DB_HOST: db
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
- db
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
INSERT INTO court (id, url) VALUES ('google', 'https://www.google.com/');
|
||||
INSERT INTO court (id, url) VALUES ('godoc', 'https://go.dev/')
|
||||
INSERT INTO court (id, url) VALUES ('aaaaaa', 'https://www.google.com/');
|
||||
INSERT INTO court (id, url) VALUES ('bbbbbb', 'https://go.dev/')
|
||||
|
|
Loading…
Reference in a new issue