Skip to content

jerome-karabenli/automated-docker-deployement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated API/FRONTEND Deployment With Docker

About The Project

This is a personnal project, I made this for learning bash scripting and have deeper knowledges with docker. And also for my personal usage for deployement.

I wanted to be able to deploy quickly and securly any API or frontend with simple conf file.

This is thinked for nodeJS backend and postgresql or mongodb database and optionnaly with redis database for caching.

I also add optionnal modules

  • sqitch if you want to deploy fresh relational database without any data but ready structure
  • seeding if you aldreay have an backup file of your database
  • scheduled backups with cron
  • send over ssh your backups to another sever (using rsync)

It's my first bash script, so it's not perfect at all !

Built With

Docker Bash NodeJS
Redis MongoDB Postgresql
Sqitch

Tested on

  • ubuntu 21.04
  • debian 10
  • macos BigSur (you need to have homebrew installed to be able to install coreutils and gnu_sed)

I also test on cloud with debian 10 vm with linode

Getting Started

Prerequisites

  • docker
    $ curl -fsSL https://get.docker.com -o get-docker.sh
    $ sudo sh get-docker.sh
    $ sudo usermod -aG docker ${USER}
    $ sudo systemctl enable docker
  • docker-compose
    $ sudo apt-get install libffi-dev libssl-dev
    $ sudo apt install python3-dev
    $ sudo apt-get install -y python3 python3-pip
    $ sudo pip3 install docker-compose
  • api files/folder must be in automated-docker-deployment/api folder
  • frontend build files must be in automated-docker-deploymentfront/build folder

Installation

  1. Populate config.sh file, there is a lot of comments in this file for help
  2. Be in automated-docker-deployment/docker folder and type
bash automated-docker-deploy.sh

or

sudo bash automated-docker-deploy.sh

in case of your docker installation need sudo

Roadmap

  • Setup main script
  • Have separation of concerns (with separated conf file)
  • Add sqitch module
  • Add seeding module
  • Add backup module
  • Add ssh module

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Jerome Karabenli - contact@jkarabenli.dev

Project Link: https://github.com/jerome-karabenli/automated-docker-deployement

Acknowledgments

Infos

Just be careful with .dockerignore file, not forgot to adapt it for your usage.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published