Giter Site home page Giter Site logo

denv-creator's Introduction

denv-creator's People

Contributors

ebebbington avatar willjb95 avatar

Stargazers

 avatar

denv-creator's Issues

Investigate Other Containers

What
Investigate containers we haven't developed or aren't on the list

How
Think how python, node, sql and php-fpm can be containers, then think of other tools or languages that can be implemented

Where

Why
To support as many containers as possible

End Result
A clear list of containers we can create

Checklist

Resources

Tests

What
Write tests

How
(Give any suggestions on how this could be implemented e.g. "Use pythons panda module")

Where
(Give input on what files would have this logic implemented)

Why
(Reason for this request)

End Result
(Describe what the end result will be)

Checklist

  • List of items that feature must fulfil
  • Update README
  • Add CI

Resources
(Any docs, links, videos etc that can support this feature)

Create PHP-FPM Class

What
Create the PHP-FPM class as a new container to build. This includes:

  • docker-compose.yml block
  • phpfpm.dockerfile
  • php.ini file (this can be a local copy and it can just be copied over into the new project)

How
Create the file in containers/ and the class must implement properties to house the required content for the configurations

Where

Why
Allow the project to support a PHP-FPM container

Checklist

  • PHP-FPM Class
  • Contains content for the dockerfile
  • Contains content for the docker-compose file
  • Create a php.ini file that uses the default configurations
  • Integrate logic into the Project class to write all content above
  • uPDATE readme

Resources

Ask the User for a Prefix

What
We need to prefix the docker containers with something, so as part of the user setup process, ask the user for a prefix. The prefix must be lowercase and a single word. The method exists in the Project class but not the logic

How
Use the response class to ask for a prefix. Look at how other methods implement it

Where

Why
We need to prefix containers as well as the network

End Result
Prefix is saved as a property inside the project class and this is added to every required bit in the end configuration (former is most likely done)

Checklist

  • Develop existing method

Resources

Archive

Do we want to archive this? should i make this in another language? should i just movee the dockerfiles into a private repo to keep a reference to them?

Make Nginx & Apache Start Last

What
Make Nginx and Apache start last as a container e.g. it depends on every service defined

How
Simple check inside the related Project method, e.g. (in JS):

for container in self.containers : 
  if container == 'nginx':
    depends_on = ['    depends_on:']
    for cont in self.containers:
      if cont != 'nginx':
        depends_on.append('      - ' + cont)
    nginx = Nginx(...)
    nginx.update_services_to_depend_on(depends_on)
    ...
def update_services_to_depend_on(self, depends_on):
  this.depends_on = depends_on

def write_to_docker_compose_file(...):
  # somehow include the depends on array here

Where
In the related project method

Why
Nginx and Apache could error when a service is defined in it's config but hasnt yet been 'upped'

End Result
Nginx and Apache is built last

Checklist

  • Nginx is built last
  • Apache is built last
  • Update README

Resources

Pop Module

What
Maybe also turn repo into a pip python package

How

Where

Why
It would be cool

End Result
denv creator is a pip module

Checklist

  • Adjust repo to be a pip module
  • update readme

Resources
(Any docs, links, videos etc that can support this feature)

Automate Git Initialisation

What
Run a command once the new users project is created to initialise an empty git repository

How
I'm not sure on what command in python can do this but there must be one

Where
Develop the existing method inside the Project class and test it by calling it in the index.py file (already there)

Why
No one has coding projects without a VCS, automate this process for the user to make their life easier

End Result
Git repo will be initialised for the users new project

Checklist

  • Develop init_git_repo method
  • Update README to say we automate the git init process
  • Supply a message to the user saying we did this

Resources

Show List Of Container Supported

What
Allow the user to ask for the supported list of containers

How
Inside the Project class, create a method that uses the response class to ask if they wish to see a list of containers. Then in the index file, call this method. If the output is yes then show the list of containers.

The list should probably lie in a config file that the Project class reads and displays. The list of containers should be an array of strings. Eg in JSON, the config file would look like this:

{
    containers: [
        'nginx',
        ...
    ],
}

Where
index.py
denv-creator.config (some file python can read data from
project/main.py

Why
Allows the user to see what containers they can pick from instead of going in blind

End Result
A nice list of containers should display if the user asks

Checklist

  • Config file created that can be readable and containers a list of containers we support
  • Logic that calls the method from the main file in the index file
  • Logic to make this happen inside the Project class

Resources

Create SQL Container Class

What
Create an SQL class

How

Where

Why
Support the use of building an SQL container

End Result
The user can specify sql as a container to build and it will be bundled in the end process

Checklist

  • LCreate the SQL class to fulfill all requirements
  • Allow the use of an sql data dump to seed the db from
  • Update README

Resources

Create Mongo Seeder Class

What
Create a MongoDB seeder class

How

Where

Why
So a user can specify if they wish to use with with the mongo container. Should only be present if mongo is specified

End Result
A user can specify the mongo seeder class and it is built into their new project

Checklist

  • Create the functionality
  • Update README

Resources

Create Deno Container

What
Create a drash container

How

Where

Why

End Result

Checklist

  • Drash container
  • Update README

Resources

Initialise docker-compose.yml

What
Create the starting line for the docker-compose.yml file

How
Write the text in the method to the docker compose file

Where
project.py with the todo of this issue

Why
We need this bit before adding any container configuration

End Result
The docker-compose.yml file starts with:

version: 3
    services:

Checklist

  • Docker-compose file starts with the correct text

Resources

Create Apache Container Class

Requires further investigation to see what goes into creating an apache container

What
Create an apache class that holds data required for an apache docker container

How

Where

Why
Support use of apache for this project

End Result
User can create configurations for an apache container

Checklist

  • Create apache class and all data
  • Update README

Resources

Add Network Block to docker-compose File

What
Add the network block to the docker compose file to bridge the containers together

How
Here's the code that should be written to the docker-compose.yml file:

networks:
  {}-network:
    driver: bridge

Where {} is the prefix the user gives for the project. you can utilise this property on the Project class

Where

  • project/main.py
    The function is already created, search for add_network_block and fulfill the rest of the requirements

Why
Allows the containers to speak to each other (a bridged network)

End Result
A network block will be added to the docker-compose.yml file with the correct prefix

Checklist

  • Write this data to the docker-compose.yml file but this must be AFTER everything has been added

Resources

Create MongoDB Container Class

What
Create the MONGO DB Class

How

Where

Why
So users can specify a mongo db container

End Result
Mongo db container is configured in the end process

Checklist

  • Create all required logic
  • Update README

Resources

Fix Apache

What
Fix the configuration file content and dockerfile content for the Apache container

How
Update the text blocks inside the class with the following data:

// conf
LoadModule proxy_module /usr/local/apache2/modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

<VirtualHost *:80>
  ProxyPass / http://drash_app_drash:1447/
</VirtualHost>
// dockerfile
FROM httpd:2.4

RUN apt update -y
COPY .docker/conf/apache.conf /usr/local/apache2/conf/demoapache.conf
RUN echo "\nInclude /usr/local/apache2/conf/demoapache.conf" >> /usr/local/apache2/conf/httpd.conf
RUN cat /usr/local/apache2/conf/httpd.conf

Then update the port mapping in docker compose file with: 8080:80

Why
It's broken

End Result
Container will build successfully

Checklist

  • Container builds successfully
  • Apache config port is corrected

Create Dirs for Each Container

What
Inside each container class, create a directory named after the class name, and create a method to do this, and write the basic files for each class e.g. in the Node container you might have a ecosystem.config.json or in a .env file. Also adjust the methods for writing such as the working dir and volumes

How

Where

Why
Automates more of the process for user and this stuff is usually the standard when creating projects

End Result
Directories are created for each specified container with the necessary files

Checklist

  • Update readme on what each containe gives
  • Directoris named after the container are places inside src
  • Necessary files are created in that dir
  • Update write methods to include the above

Resources

Redis Container

What
Add Redis as a container to build

Why
So users can create a redis container

End Result
User can specify a redis container to create and ends up in their new project

Checklist

  • Create redis container class
  • Update dreadme
  • Update method in project class

Resources
Use redis configs from juanportal project

Folder Re-structure

What
Initially, we are creating the project inside this repo, this now sounds like a terrible idea. Restructure the project so that we create the user's project in a seperate dir, and move the files outside of project and into the root. Also remove the 2nd docker-env-creator dir as it's not needed anymore

How
(Give any suggestions on how this could be implemented e.g. "Use pythons panda module")

Where
(Give input on what files would have this logic implemented)

Why
(Reason for this request)

End Result
(Describe what the end result will be)

Checklist

  • List of items that feature must fulfil

Resources
(Any docs, links, videos etc that can support this feature)

Create Node Container Class

What
Create the Node container class

How

Where

Why
Support the use of a node container

End Result
Users can specify a node container that ends up being built

Checklist

  • Fully develop the node functionality
  • Update README

Resources
(Any docs, links, videos etc that can support this feature)

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.