Step to step guide on setting up go server
Not sure if this is the best format for submitting a minimal setup guide, if @supersonictw thinks it's not appropriate then I will close it anyway
Required docker images:
Popcat server require redis for cache and mysql for stats aggregation so you will these image other than the popcat image.
docker pull supersonictw/popcat-echo
docker pull redis
docker pull mysql:5.7
docker run -p 6379:6379 -d redis:latest
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<Your password> -d mysql:5.7
Setup MYSQL
Use the initialize.sql script to setup your MYSQL database schema. You may need to connect to your database before this.
Execute image
Setup docker environment variable file according to .env.sample
I find this DSN format working under my own setup ( under Linux environment you will need to change docker.for.mac.localhost to the docker IP )
MYSQL_DSN=<mysql user>:<password>@tcp(docker.for.mac.localhost:3306)/<your database name>?charset=utf8
Execute popcat server
docker run -p 8013:8013 --env-file <your environment variable file> supersonictw/popcat-echo
You should be able to access popcat server at localhost:8013 !
Excellent! Thank you for your contribution.
By the way, there are some scripts available on https://github.com/supersonictw/popcat-echo_deploy.
Hi, I'm really new to databases. Can you explain more details on how to create, connect to the database, deploy the script and DSN, .env kinda stuff? Thanks in advance!
there are some scripts available on https://github.com/supersonictw/popcat-echo_deploy.
By the way, the deploy script is not working for me, what am I missing? It's showing a ERROR 1045 (28000): Access denied for user '-p'@'localhost' (using password: NO) error.
Seems like it can't understand the $MARIADB_... variables.
Hi, I'm really new to databases. Can you explain more details on how to create, connect to the database, deploy the script and DSN, .env kinda stuff? Thanks in advance!
there are some scripts available on https://github.com/supersonictw/popcat-echo_deploy.
By the way, the deploy script is not working for me, what am I missing? It's showing a
ERROR 1045 (28000): Access denied for user '-p'@'localhost' (using password: NO)error. Seems like it can't understand the $MARIADB_... variables.
I'm sorry too late for replying, I was so busy on improving the example of web client. I write down an article on https://medium.com/@supersonictw/to-create-the-server-of-a-popcat-like-game-128b0fd82a58 You can follow it to create your own popcat-like games.
It didn't work but still thank you! ~~We solved it by making our own backend lol~~
The application already refactor, so the guide might be not working. The new one is here.
git clone https://github.com/supersonictw/popsenzawa-echo-deploy.git
cd popsenzawa-echo-deploy
sh initialize_mmdb.sh
docker-compose up -d