[!IMPORTANT] This is the old version of NIployments, used circa 2019 until 2024, now we use a Kubernetes-based system that you can access at new NIployments repo.
Repository to manage and document NIAEFEUP's deployments.
"It's 2019 and we are still manually
ssh
'ing into a machine instead of using fancy stuff that will also inevitably break!"
The objective is to have a place for not only backing up, but also generally version controlling server configs. This will make them more accessible (scary, but probably good) - let's not forget that bugs are shallow.
server-configs
- Configurations of niserver (such as apache configs, for example)utils
- Random (bash) utilsdeployments
- Configuration for deployment of ni projectsdockerfile-templates
- Templates of production-ready Dockerfiles, to use in projects to then be used by deployments
slack
- Utilities for communicating with SlackThis repo will contain the configurations of the branch's production web server (niserver), some configs for CD by tracking the master
branch of some repos (via cron
- webhooks would be more trouble than it's worth) and other notes that might be relevant.
CD will be setup. In order to be eligible to do so, a project must follow certain criteria:
master
branch (really don't want to handle broken deploys :( )Dockerfile-prod
that when built and ran exposes a running server to port 80 (which is then remapped in the docker run
command) - there are some examples available in dockerfile-templates/
PORT
env variable with the value of 80
will also be passed when running, so you can also rely on that if you ensure that that works..env*
configuration files (mapped in deployments/project-configs.sh
)Note: Currently all of the projects must be running a daemon exposing a port. Static builds should use something like nginx to expose the built files. (See dockerfile-templates/Dockerfile-react
as an example of this)
The project to deploy must also have a path (URI) and port allocated to it (which will be documented in server-configs
, hopefully - or at least in deployments/project-configs
(PORT) and in server-configs/apache/config-modules/routing.conf
(URI)). Again, in case of doubt: bother people.
For further details, take a look at deployments/
.
Obviously, especially since this is not a private repo (and even if it were!) secrets are not to be used here. Instead use other options such as environment variables or relying on local configuration files (such as .env
s, for example).