Giter Site home page Giter Site logo

weddingwebsite's Introduction

WeddingWebsite

My wedding website

Environment setup

  • Install python 3.6
$ python3 -m venv venv
$ source venv/bin/activate 
$ cd weddingwebsite
$ pip install -r requirements.txt

Application setup

$ cd weddingwebsite
$ python manage.py migrate
$ python manage.py makemigrations
$ python manage.py createsuperuser
$ python manage.py collectstatic --noinput --clear
$ django-admin makemessages
$ django-admin compilemessages

##Test the app:

$ python manage.py runserver 80

OR

$ gunicorn -d -b 0.0.0.0:80 weddingwebsite.wsgi

then go to: localhost:80

Run the app with NGINX

  1. Install nginx:
$ sudo apt install nginx
  1. Create a config Nginx file:
$ touch /etc/nginx/sites-available/weddingwebsite
  1. Paste the configuration from weddingwebsite_nginx.conf file into the file: /etc/nginx/sites-available/weddingwebsite

  2. Link this file to the sites-enabled Nginx folder:

$ sudo ln -s /etc/nginx/sites-available/weddingwebsite /etc/nginx/sites-enabled
  1. Check if created configuratin does not contain any bugs by typing:
$ sudo nginx -t

If all is ok, you should see similar info:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
  1. Modify a gunicorn run command to be able to talk to Nginx:
$ gunicorn --daemon --workers=5 --bind unix:~/WeddingWebsite/weddingwebsite/weddingwebsite.sock weddingwebsite.wsgi

OR 7. Run gunicorn_run.sh script:

$ sudo chmod u+x gunicorn_run.sh
$ ./gunicorn_run.sh
  1. Modify /etc/nginx/nginx.conf as shown below:
user root www-data
  1. Restart Nginx:
$ systemctl restart nginx
  1. Open 0.0.0.0:80 in the browser, your app should be running smoothly right now : )

weddingwebsite's People

Contributors

luk6xff avatar

Stargazers

 avatar

weddingwebsite's Issues

Icons misaligned on mobile

Hello, I can see that icons fa-envelope-o and fa-phone-square in contact section are misaligned when page is viewed on mobile phones. Is it possible to fix this issue? :D

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.