helpwave / rest-api

The official restful application programming interface of helpwave
https://api.helpwave.de
Mozilla Public License 2.0
5 stars 0 forks source link

docker-compose.yml for mocks database always exit with errocode 1 #84

Open florian-sabonchi opened 1 year ago

florian-sabonchi commented 1 year ago

mocks container alwasy exited with errorcode 1

florian@florian:~/Dokumente/rest-api$ sudo docker-compose up mocks
Creating network "rest-api_default" with the default driver
Creating rest-api_postgres_1 ... done
Creating rest-api_migrate_1  ... done
Creating rest-api_mocks_1    ... done
Attaching to rest-api_mocks_1
rest-api_mocks_1 exited with code 1
FoseFx commented 1 year ago

It does that when it does not insert the mocks.sql. I guess we could change that by adding || exit 0 to the command, but honestly, why bother?

felixevers commented 1 year ago

Yeah, maybe we should fix that. We could also mutate the sql commands to execute those inserts only on an empty database.

felixevers commented 1 year ago

Also move mock.sql to db/mocks/example.sql or something. We should add these mock folder to the .dockerignore file.

florian-sabonchi commented 1 year ago

We shoud also create a Dockerfile

felixevers commented 1 year ago

We shoud also create a Dockerfile

What do you mean? We already got a Dockerfile for this repository.