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

Add docker-compose file? #340

Closed
illegalnumbers opened this issue Oct 17, 2016 · 10 comments · Fixed by #410
Closed

Add docker-compose file? #340

illegalnumbers opened this issue Oct 17, 2016 · 10 comments · Fixed by #410
Milestone

Comments

@illegalnumbers
Copy link

Might want to add that in. My docker experience for the most part has been limited to using composition files to compose containers, it might be overkill for you if you don't have a whole lot of services but I noted that you had a dockerfile present already so if you have at least one other service or want to run automated tests under a container or a variety of other uses it could be helpful.

@rolandgeider
Copy link
Member

I had thought about a bit about this, but yeah, would be a bit overkill. The current images are made more with the intention to try the application than to really deploy it.

On the other hand, this is not something that I would be opposed to, having more or less tuned images would be great to have, just something that hasn't happened yet

@illegalnumbers
Copy link
Author

I guess without delving deeper into the nuts and bolts of the services I couldn't say how much of a benefit it would give. I can look more into it though. Be nice to have an easy deploy system.

@rolandgeider
Copy link
Member

Just to document things, I have started working on a docker compose file on the appropriately named docker-compose branch. There are a couple of very ugly things, but it shouldn't be too difficult to finish

@hughesjs
Copy link

I've had a look at your docker-compose branch and I'll be honest, I've not too sure why it's been set up the way it has been. I've got a bit of experience with docker-compose so if you have the time to explain a little how the app architecture works (I'm really unfamiliar with django and python webapps) I could try and help here.

@rolandgeider rolandgeider linked a pull request Jun 16, 2020 that will close this issue
@rolandgeider
Copy link
Member

I'm afraid I can't tell you anymore why it was set up like that 😅 In the meantime, the regular dockerfiles have been updated as well, so those changes should be used here as well to begin with. Another thing that I noticed is that the development was setup for development, which is probably a bit overkill, a more or less production-ready config would be more useful.

As for the architecture, we would need a database (preferably postgres), some caching for sessions etc and the webserver. As far as I remember, there was a problem with the database setup, since it needs the application to install the migrations and load the initial data, but I can't tell you more

@hughesjs
Copy link

Have you got Discord? Maybe we could have a chat on there and see if we can get it working.

I've been chatting to the guys over at LinuxServer.io and they seem vaguely interested at adding this to their fleet if we can get something running well.

@rolandgeider
Copy link
Member

Sorry I don't. We can use gitter, since there's already a channel there. Basically the idea is to do something like this

@rolandgeider rolandgeider added this to the 2.0 milestone Jul 27, 2020
@rolandgeider
Copy link
Member

I've beaten the docker-compose a bit into form, seems to be working enough now.

@AlexKalopsia
Copy link

Hi, I am having some issues setting up wget with docker-compose.

What I did was to pull the entire repo, then run docker-compose.yml, but it results in a bunch of errors

cp: cannot create regular file '/home/wger/src/settings.py': Permission denied
Waiting for postgres...
PostgreSQL started :)
Traceback (most recent call last):
  File "/usr/local/bin/wger", line 33, in <module>
    sys.exit(load_entry_point('wger', 'console_scripts', 'wger')())
  File "/usr/local/bin/wger", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/lib/python3.8/importlib/metadata.py", line 504, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/lib/python3.8/importlib/metadata.py", line 177, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: wger
Traceback (most recent call last):
  File "manage.py", line 20, in <module>
    setup_django_environment(get_path('settings.py'))
  File "/home/wger/src/wger/tasks.py", line 312, in setup_django_environment
    django.setup()
  File "/usr/local/lib/python3.8/dist-packages/django/__init__.py", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/usr/local/lib/python3.8/dist-packages/django/conf/__init__.py", line 83, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.8/dist-packages/django/conf/__init__.py", line 70, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.8/dist-packages/django/conf/__init__.py", line 177, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'settings'

the docker-compose file in the extras folder seems to be exclusively focused on the dev environment, and I just want to have the latest release of wger running on my server. Any idea what could be the issue? I've tried following the docs but I am still a bit confused.

@rolandgeider
Copy link
Member

I've moved this to a new issue

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

Successfully merging a pull request may close this issue.

4 participants