Closed akamya997 closed 1 month ago
.PHONY: setup-dependencies
setup-dependencies: unset-dependencies build get-front get-problem-packages
docker compose up -d postgres redis minio clickhouse
@echo "Wait 10 seconds for db setup"
sleep 10s
./bin/init
We can do like this in a shell script while poll:
docker exec oj-lab-platform-postgres-1 psql -U postgres oj_lab
But other service like redis minio, should we also do like this?
It is not so efficient maybe.
It will be better if we provide cleaning method instead of restarting all the dependencies in docker compose. You can't avoid the startup time too much if we continue to do in the previous way
Closing this issue and we follow the progress in #97
When setting up dependencies, in the current
Makefile
, it simply sleeps for 10s, which may lead to certain problems.For example, if one has set up a postgres server locally using the same password and username, he will fail to use the db
oj_lab
and spend his day locating the problem.To solve this, we should check whether the database
oj_lab
is well set in this step.