Coder Social home page Coder Social logo

poll-web's Introduction

Highlights

Key functionalities:        RESTful web service + CI
Tech used: Python, Django, PostgreSQL, Docker, Jenkins

Getting Started

  1. Clone the repo
git clone https://github.com/hanjustin/Poll-Web.git
  1. Start Jenkins CI & Postgres
docker compose up
  1. Create database tables
python manage.py migrate
  1. Run
python manage.py runserver
  1. Use the webservice XXXX
curl -XGET -H "Content-type: application/json" -d '{"name": "Justin", "username": "hanjustin"}' 'http://localhost:8080/api/users/'

Running Jenkins and Postgres separately

docker compose up runs both Jenkins Postgres together. To run them separately, use the commands below:

Jenkins

  1. Build Jenkins image
docker build -t jenkinsimage .
  1. Run the image in Docker
docker run --name jenkins -p 8080:8080 --env JENKINS_ADMIN_ID=admin --env JENKINS_ADMIN_PASSWORD=password jenkinsimage

Postgres

docker run --name postgres-test -e POSTGRES_DB=djangoPostgreSQL -e POSTGRES_USER=mydatabaseuser -e POSTGRES_PASSWORD=mypassword -p 5433:5432 postgres

poll-web's People

Contributors

hanjustin avatar

Watchers

 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.