Code Monkey home page Code Monkey logo

hausmans-1's Introduction

Hausmans

Application to serve static site for Hausmans

Running the app locally

cp packaging/environment/example.env.dev .env
cp docker-compose-dev.yml docker-compose.yml
docker-compose up --build

View the application at localhost:8000

Loading test data

To load dummy data for testing, run:

docker-compose exec web python manage.py loaddata fixtures/test_data.json

Loading this test data also creates a superuser with the following login information:

username: superuser
password: superuser

Deployment Notes

This app uses nginx running in a docker container.

Use the docker-compose-prod.yml file when running on a server.

cp packaging/environment/example.env.prod .env
# fill in values in .env
cp docker-compose-prod.yml docker-compose.yml
docker-compose up --build -d

To set up SSL certificates with certbot, edit the init-letsencrypt.sh file and all nginx files in the nginx directory to have the correct domain name.

Then run ./init-letsencrypt.sh to generate the certificates.

Once the certs have been generated, the application can be started with

docker-compose up --build -d

###Loading portfolio project data

The images for the portfolio projects that were on the legacy version of hausmans.com can be found in the src/hausmans/public_app/media_fixtures directory.

To load them into the media directory so Django can recognize them and serve them in the front end, run the following command:

docker-compose exec web python manage.py collectmedia

In addition, the database records for these projects are stored in the fixtures directory. To load these records, run:

docker-compose exec web python manage.py loaddata fixtures/portfolio_projects.json

After these two commands have been ran, the database will be seeded with the portfolio projects from legacy hausmans.com

hausmans-1's People

Contributors

averycpawelek 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.