Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

maxvasylets/devops-test-task

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Task

Create Vagrantfile and ansible playbook for setting up backend and frontend applications.

So I should be able to run vagrant up And vagrant should

  • create virtual server
  • provision it (using ansible playbook) with everything needed for frontend and backend
  • download (f.e. git clone) and deploy frontend and backend to vagrant box
  • frontend should be available on port 80, path /app
  • backend should be available on port 80, path /api

you can provide your ansible playbook and Vagrantfile in any convinient way

Frontend

It is webpack+react applicaiton

to build

cd frontend
npm install
NODE_ENV=production npm run build

application will be bundled to frontend/build folder as a static assets.

Backend

It is python(flask)+postgres app

how to run:

cd backend
pip install -r requirements.txt

POSTGRES_HOST=localhost \
POSTGRES_DB=app \
POSTGRES_USER=user \
POSTGRES_PWD=password \
python2 flask_app.py

now you should be able to open :5000 and :5000/from-db

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 54.9%
  • HTML 28.1%
  • Python 9.9%
  • CSS 7.1%