kylej26 / boardgame-directory

0 stars 0 forks source link

Make a script to launch a test #2

Open horner opened 10 months ago

horner commented 10 months ago

Consider a docker compose to run a docker container for mariadb and a container for your app. Your app will have a Dockerfile

kylej26 commented 10 months ago

Im having some trouble with the docker compose. Im able to get the container running for mariadb without any errors. When I run docker-compose i get this error: Error: connect ECONNREFUSED 127.0.0.1:3306 saying my connection to the database is being refused.

I cannot seem to find anything helpful on this and was wondering if you have any ideas. I have seen changing localhost to 127.0.0.1 / to match the image name of my database container or making sure services is running for mysql/mariadb. I even rewrote the code into new folders just to make sure there wasnt any typos I was missing.

I know the connection is okay though because when I just run the app normally with npm start it starts up normally and I am able to make changes to the database.

horner commented 10 months ago

You can't run the Docker container on your host if you're already running my SQL on the host. You can't have two services listening to port 3306. Try using a different port for your docker or make sure that you have the mysql service turned off on your own system.