fossasia / eventyay-video

https://video-dev.eventyay.com
Apache License 2.0
1.49k stars 22 forks source link

Set up Docker #94

Open mariobehling opened 3 months ago

mariobehling commented 3 months ago

Our goal is to set up docker of system for a) development branch video-dev.eventyay.com b) master branch video.eventyay.com

You can test this locally or on one of the project on your own server first.

In order to achieve this we need a deployment using Docker.

Here is a starter docker compose, but it does not fully work for online deployment: https://github.com/fossasia/eventyay-video/blob/development/docker-compose.yml

What we need is:

it-tma-tri commented 2 months ago

related links: https://github.com/fossasia/eventyay-docker https://github.com/fossasia/eventyay-video/pull/102 https://github.com/fossasia/eventyay-video/blob/development/docker-compose.yml

odkhang commented 2 months ago

Hi @mariobehling, please help me answer some below questions:

  1. Is the docker-compose file for eventyay-video running stably?
  2. When does the automatic deployment action work? Is it true that merging code into the 'develop' and 'master' branches triggers an automatic deployment?
mariobehling commented 2 months ago

@odkhang The automatic deployment is not working using https://hub.docker.com/r/eventyay/eventyay-video. The goal is to make it work just for the dev branch. Feel free to share the errors you get here.

norbusan commented 2 months ago

Concerning 1: I am not sure, it is very convoluted, this probably needs testing. In particular the network definition at the end looks suspicious to me

Concerning 2: There are several problems:

untari commented 2 months ago

@odkhang

  1. We build a docker images using the github action and push it to docker hub on every merge
  2. Currently using the development branch
  3. There's a docker-compose deployment on the server with a watchtower docker that checks for new versions of the docker image in docker hub every 10 mins. If there's any, it updates the image

Current problem: There's a backend and a frontend. Using the main docker-compose.yaml locally seems to work, but it builds everything from scratch and apparently using dev mode and without the venuless command (needed for creating superusers and other management actions). Also this docker-compose builds frontend and backend into two separate docker images. Note: I was able to use this command: docker exec -it <container_name> python manage.py create_world instead of using docker exec -it <container-name> venueless create_world. For creating a world and createsuperuser.

The current image in dockerhub is built using the dockerfile in the root, which builds frontend and backend together, but when we try to deploy this image the frontend fails due to a "npm not found" error, backend seems to succeed though.

odkhang commented 2 months ago

Hi @marcoag, as discussed in meeting, I have implemented 2 options for auto deployment, which can be found here https://github.com/odkhang/eventyay-video/blob/feature-94 Please let me know if any issue from your end when testing it.