Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Docker #94

Open
mariobehling opened this issue May 23, 2024 · 6 comments
Open

Set up Docker #94

mariobehling opened this issue May 23, 2024 · 6 comments
Assignees

Comments

@mariobehling
Copy link
Member

mariobehling commented May 23, 2024

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:

  • a dockefile or 2 dockerfiles (depending if you build all together or frontend and backend separated) that builds images
  • a docker-compose that deploys those images in a working way
@odkhang
Copy link
Collaborator

odkhang commented Jun 12, 2024

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
Copy link
Member Author

@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
Copy link
Member

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:

  • the workflows in .github/workflows sometimes use incorrect branch names like master
  • I am not sure the tags that are attached to the images are correct
  • The tags need to be synced with docker-compose.yml file

@untari
Copy link
Contributor

untari commented Jun 13, 2024

@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.

@mariobehling mariobehling changed the title Set up autodeployment using Docker Set up Docker Jun 13, 2024
@odkhang
Copy link
Collaborator

odkhang commented Jun 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants