Code Monkey home page Code Monkey logo

heximages's Introduction

HexImages - HexOcean recruitment task

On env files

In a real project I would of course not include env files, and instead I would list all the important variables and what they represent, but as this is just a recruitment task I've decided to include the env files I used in the repository to make the project setup easier.

Project setup - Dev mode

In the main project directory:

  • run docker compose build
  • run docker compose run web python manage.py makemigrations
  • run docker compose up

That's all!

Project setup - Production mode

After making sure there's no other service using port 80 (if you want to use other ports, you can do so in docker-compose.prod.yml in ports in the nginx service, but urls generated by the API will be lacking the port number), in the main project directory:

  • run docker compose -f docker-compose.prod.yml build
  • run docker compose -f docker-compose.prod.yml run web python manage.py makemigrations
  • run docker compose -f docker-compose.prod.yml run web python manage.py migrate
  • run docker compose -f docker-compose.prod.yml run web python manage.py createsuperuser and follow the superuser setup
  • run docker compose -f docker-compose.prod.yml run web python manage.py loaddata initial_data.json
  • run docker compose -f docker-compose.prod.yml up -d

Before you start using the API you either have to set a tier for the superuser, or create a new user in the Admin UI.

On tests

I've written some tests to show that I can write them, but they are extremely lacking because I didn't have much time this week to work on this project. In a work environment I would of course write a complete test suite.

heximages's People

Contributors

jakub-wilk 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.