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