diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..74ad52b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/configuration-reference/#executor-job + docker: + - image: circleci/python:3.8 + # Add steps to the job + # See: https://circleci.com/docs/configuration-reference/#steps + steps: + - checkout + - run: | + cd cool_counters + python3 -m pip + pip install django + python3 manage.py migrate + python manage.py runserver + + + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/configuration-reference/#workflows +workflows: + say-hello-workflow: + jobs: + - say-hello diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3c930ca --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# set the Base Image from which your image will be built on +FROM python:3.8 +# create a directory called flask-circleci in root. +# This directory will contain the code which currently resides in +RUN mkdir /flask-circleci + +# make /flask-circleci the working directory +WORKDIR /flask-circleci + +# copy your requirements file to the directory you just created +COPY requirements.txt /flask-circleci + +RUN pip install -r requirements.txt + +# copy the current directory in you local machine to /flask-circleci in your image +ADD . /flask-circleci + +EXPOSE 5000 + +CMD python main.py