Skip to content
jexniemi edited this page Nov 25, 2018 · 9 revisions

Welcome to the ohtuilmo-frontend wiki!

  • sudo might need to be used with docker commands

How to run frontend, backend and database using docker-compose

  • Create file docker-compose.yml and copy content from docker-compose.yml file in our shared google drive folder.
  • Make sure docker and docker-compose are installed, and run docker-compose up in the same directory where you placed the docker-compose.yml file.
  • Now frontend is running on port 7000 and backend on 7001.

How to use local frontend

  • Do the same as in instructions above but comment out frontend part from docker-compose.yml so docker-compose doesn't start frontend. Now start your own frontend and use it instead.

How to use your own frontend/backend image instead of our master branch images that are on docker hub

  • Use the same docker-compose.yml as in first instructions
  • Replace "ohtuprojektiilmo/ohtufront" with your own local frontend image. Here is instructions how to make docker image.
  • You can do the same with backend image as well.
  • Run docker-compose up to start containers.

Accessing database

  • use docker ps to see name of database container
  1. Make sure database container is running
  2. Open new terminal or use detached mode when starting all containers (docker-compose -d up)
  3. docker exec -it containername /bin/bash lets you run commands inside a container
  4. Run psql -U postgres inside container and now you should be able to do sql queries
  5. Run \dt to show all tables in the database