Members site for Tippicanoe Arts Federation.
- Install Docker and Docker Compose
- Install Node and npm/yarn
- Run
yarn install
- installs Javascript Dependencies - Run
yarn build
- this builds the front end files to be served by Django - Run
docker-compose up
in the root directory of the project- If a python error displays such that you can't connect to the database, exit and restart the command and it should connect
- The site should display at http://localhost:8000
- Install docker and compose
- If you're on a Mac, this is just
brew install docker docker-compose
(make sure you have homebrew installed).
- If you're on a Mac, this is just
- Make sure you have a docker-machine running.
- If you don't, you may need to
brew install docker-machine
, then rundocker-machine create default
to create a VM in which to run docker containers. - After you create a
default
docker-machine, you can make sure it's running withdocker-machine ls
. If you don't see yourdefault
machine running in the table, then rundocker-machine start default
to start the docker-machine. (When you're done with docker you can stop the virtual machine withdocker-machine stop
.)
- If you don't, you may need to
- Run
docker-compose up
. This should bring up both docker containers, labelledweb
(for Django) anddb
(for Postgres).- If you see an error about not being able to connect, you may need to help docker-compose find the existing docker machines by running
eval $(docker-machine env)
. This exports variables about running docker instances to the shell. Now,docker-compose up
should work. - If you want docker to run in the background, do
docker-compose up -d
, which should daemonize the docker containers into the background.
- If you see an error about not being able to connect, you may need to help docker-compose find the existing docker machines by running
- The server should be running on port 8000 on localhost.
- To run a database migration:
docker-compose run web python manage.py migrate
- Any
./manage.py
operations should be prefixed withdocker-compose run web
. Otherwise, your computer will try to run Django outside of docker, which won't work.
- Any