You can run the application using the development image or production/deployment image.
Make sure to supply the youtube api key in env/production.toml
cp env/example.toml env/production.toml
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.toml
cp env/example.toml env/production.toml
-
Open
env/production.toml
and put your youtube API key in. -
To build the image locally using the prod image make sure you are in the project root
/opentogethertube
before running the command below.
docker-compose -f docker/docker-compose.yml up -d
- Wait for everything to finish starting, and 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