Code Monkey home page Code Monkey logo

personnel's Introduction

Personnel v2 Setup

Contains the configurations and instructions to string together the personnel system and forums, both in development and in production.

Local development

Prerequisites

  • Git, for version control
  • Docker, to run the applications
  • mkcert, to generate local SSL certificates (or some other tool)
  • A database dump of the personnel and vanilla databases, obtained from a 29th admin
  • A copy of the uploads directory from the forums (optional)

Installation

Clone this repository.

git clone https://github.com/29th/personnel.git

Navigate inside the directory that's created and clone the individual application repositories within it.

cd personnel
git clone https://github.com/29th/personnel-api.git
git clone https://github.com/29th/personnel-app.git
git clone https://github.com/29th/forums.git
git clone https://github.com/29th/personnel-v3.git

Place the 2 database dump files in the db directory. They should be named personnel.sql and vanilla.sql.

Optionally, create an uploads directory containing the user image uploads from the forums.

Generate a locally-signed SSL certificate using mkcert. This generates two files, which should both end up in the certs directory.

mkcert -cert-file certs/29th.local.crt -key-file certs/29th.local.key 29th.local "*.29th.local"

You should end up with a directory structure like this:

personnel
├── forums/
├── personnel-api/
├── personnel-app/
├── db/
|   ├── personnel.sql
|   └── vanilla.sql
├── certs/
|   ├── 29th.local.crt
|   └── 29th.local.key
├── uploads/ # optional
├── docker-compose.yml
└── ...

Modify your hosts file so our desired hostnames point to your local machine. Add this line to it:

127.0.0.1 29th.local www.29th.local api.29th.local personnel.29th.local forums.29th.local phpmyadmin.29th.local

Usage

Once installed, bring everything up with one command:

docker-compose up

This will take several minutes the first time you run it, as it must download the underlying images (php, node, etc.) and load the database dumps. It should be ready when you see a line from the forums container noting the database import is complete:

db-forums    | 2019-07-05 15:00:28 1 [Note] mysqld: ready for connections.

You can access the application at the hostnames you setup:

Note that if you've used a database dump from an older version of the forums, you'll need to run vanilla's update utility to upgrade the database. Just go to https://forums.29th.local/utility/update

You can edit application files in the personnel-api and personnel-app directories locally and you should see the changes reflected in the containers. If you need to execute something in the containers, you can SSH in using:

docker-compose exec <service-name> bash
# for example:
docker-compose exec api bash

To bring everything down, press CTRL+C. If that responds with 'Aborted', you can run:

docker-compose down

This will maintain the database contents. To destroy the database contents as well, include the flag to bring down volumes:

docker-compose down -v

personnel's People

Contributors

wilson29thid 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.