You can run the application using the development image or production/deployment image.
Make sure to supply the YOUTUBE_API_KEY
in env/production.env
cp env/example.env env/production.env
You run the docker container using the docker-compose file in the root directory by using the following command.
docker-compose up -d
Go to http://localhost:8080/
The production image uses docker-compose with redis and postgres in separate containers.
To use the production image, please follow the steps below.
- Next you need to set up your configuration. Start by copying the example
config in the
env
folder to a new file calledproduction.env
cp env/example.env env/production.env
-
Open
env/production.env
and replaceAPI_KEY_GOES_HERE
with the api keys. -
To build the image locally using the prod image make sure you are in the project root
/opentogethertube
before runing the command below.
docker-compose -f docker/docker-compose.yml --env-file env/production.env up -d
- After Go to http://localhost:8080/
You can open a shell inside of the container with the following command.
docker exec -it opentogethertube sh
You can also see the logs for the multiples containers with the following command.
docker-compose -f docker/docker-compose.yml logs
You can check for the status of the application and the other container in the docker-compose file with the following command.
docker-compose -f docker/docker-compose.yml ps
You also rebuild the docker image with the following command.
docker-compose -f docker/docker-compose.yml up -d --build
docker-compose-dev.yml
is a special docker compose that is intended to assist in debugging bugs that only appear in production (which are usually bugs that occur when interacting with postgres instead of sqlite).
In order to use this setup, you must be able to run OTT outside of docker. After that, you can start it with:
docker-compose -f docker/docker-compose-dev.yml up --build