An online Skycoin advert platform, part of the getsky.org
- Nginx
- Go
- MySql
- Create database
getskytrade
- Follow the instructions to apply migrations.
- Run backend using following command
$ go run ./trade.go -binding=127.0.0.1:8081 -mysql=localhost:3306 -recaptchaSecret=RECAPTCHA_SECRET -mailUsername=MAIL_USERNAME -mailPassword=MAIL_PASSWORD -mailHost=MAIL_HOST
- Copy content of the
repo_root/.nginx/nginx.conf
file to the/etc/nginx/nginx.conf
- Create
/etc/nginx/vhost.d
folder - Create
proxy.conf
in the/etc/nginx/vhost.d
folder - Copy content of the
repo_root/.nginx/vhost.d/proxy.conf
file to the/etc/nginx/vhost.d/proxy.conf
- Find the line
proxy_pass http://backend:8081
and change it toproxy_pass http://127.0.0.1:8081
- Run
systemctl restart nginx
- Copy built client to the
/usr/share/nginx/html
folder (Instructions on how to build the client app)
- Docker
- Nodejs
- Yarn
To set up the system run following commands:
$ make run-docker
$ docker exec backend sh -c "cd /usr/local/go/src/github.com/skycoin/getsky.org/db/ && bash ./migrate.sh"
- Follow these instructions to install certbot;
- Stop docker containers using following command
docker kill $(docker ps -q)
(optional, only if docker-compose is used) - Run certbot:
sudo certbot certonly --webroot -w repo_root/.nginx/certs -d domain.name --register-unsafely-without-email -n --agree-tos
- Copy issued certificates to the
repo_root/.nginx/certs
directory (fullchain.pem and privkey.pem) - Start docker containers:
docker start $(docker ps -aq)
Please note: ./.nginx/vhost.d/proxy.test.conf
and ./.nginx/vhost.d/cert.test.conf
Nginx configuration files must be used instead of proxy.conf for manual installation to support SSL. Also, the path to the certificates issued by certbot must be specified in the proxy.test.conf configuration file.