GithubHelp home page GithubHelp logo

theportus / icam-server Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 308 KB

API for ICAM, a Compendium of Medievalist Conference Presentations

License: MIT License

Dockerfile 0.07% JavaScript 99.77% Shell 0.06% HTML 0.10%

icam-server's Introduction

icam

Index Conventionum Aevorum Mediorum - A Compendium for Medieval Conferences

By David J. Thomas, thePort.us and Matt King


Check out the live project website at https://icam.theport.us/


Full Stack (MySQL ExpressJS Angular NodeJS) app for browsing the proceedings of conferences in Medieval Studies.


Installation

Current installation is on a Docker setup.

Install docker, and docker-compose locally. Then clone this repo and move inside the directory. Finally, fetch the submodule, which contains the seeder data.

git clone https://github.com/thePortus/icam-server.git
cd icam-server
git submodule update --init --recursive

Thenm, modify the following files with your desired accounts/passwords/ports

# most crucial, for setting account passwords
/docker-compose.yml
# you must change the server_name and redirect to have the url to which you are deploying
/nginx/nginx.conf

Now, launch the docker containers with docker compose up -d.

The run command in our docker-compose.yml should have gotten the SSL certifictes for us already.

After docker is up... use docker exec to shell into the server container...

# run to get list of docker container names, look for server
docker ps
# shell into the server container
docker exec -it SERVER_CONTAINER_NAME sh
# run the server seeders
source migrate.sh
# exit out of container shell
exit

If you are running in a Windows environment, instead of running migrate.sh, run the following commands instead...

./node_modules/.bin/sequelize db:create
./node_modules/.bin/sequelize db:migrate
./node_modules/.bin/sequelize db:seed:all

Now, set the certbot to autorenew.

docker compose run --rm certbot renew

Then, stop the webserver, and output the dhparam key

docker compose stop webserver
sudo openssl dhparam -out /home/YOUR_USERNAME/icam-server/dhparam/dhparam-2048.pem 2048

Finally, modify the nginx/nginx.conf file and uncomment the lower server block. MAKE SURE to replace values with your domains. Then restart the server with docker compose restart.

That's it, the server should be up and running.

If you have problems and the docker container keeps restarting, the certbot might not have run correctly. To fix this, first, bring down the container with docker compose down. Then, re-comment out the SSH lines in your nginx/nginx.conf file. Now, bring the image back up with docker compose up -d. Then run the command docker compose run --rm certbot certonly --webroot --webroot-path /var/www/html/ --email sample@your_domain --agree-tos --no-eff-email -d your_domain -d www.your_domain. Once it is complete, un-comment out the nginx/nginx.conf file and docker compose up -d to get it started.

Local Development

To develop locally, if you want to use docker, comment out the lines indicated for local development in docker-compose.yml. Then launch with docker compose up -d.

For vanilla npm operation, move inside the server directory and start the app. First, however, you must have MySql installed locally, and have set up a database, preferably named icam, and created a user with full privileges on it named icamowner with the password password.

cd server
npm start

To run testing...

npm test

That's it!

icam-server's People

Contributors

theportus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.