{"action":"created","issue":{"url":"https://api.github.com/repos/nijel/weblate/issues/808","labels_url":"https://api.github.com/repos/nijel/weblate/issues/808/labels{/name}","comments_url":"https://api.github.com/repos/nijel/weblate/issues/808/comments","events_url":"https://api.github.com/repos/nijel/weblate/issues/808/events","html_url":"https://github.com/nijel/weblate/issues/808","id":101202287,"number":808,"title":"create docker-compose file & update dockerfile - for rapid test/production deployment","user":{"login":"mobidev111","id":7082367,"avatar_url":"https://avatars.githubusercontent.com/u/7082367?v=3","gravatar_id":"","url":"https://api.github.com/users/mobidev111","html_url":"https://github.com/mobidev111","followers_url":"https://api.github.com/users/mobidev111/followers","following_url":"https://api.github.com/users/mobidev111/following{/other_user}","gists_url":"https://api.github.com/users/mobidev111/gists{/gist_id}","starred_url":"https://api.github.com/users/mobidev111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobidev111/subscriptions","organizations_url":"https://api.github.com/users/mobidev111/orgs","repos_url":"https://api.github.com/users/mobidev111/repos","events_url":"https://api.github.com/users/mobidev111/events{/privacy}","received_events_url":"https://api.github.com/users/mobidev111/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nijel/weblate/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-15T19:31:15Z","updated_at":"2015-08-16T13:11:56Z","closed_at":null,"body":"docker-compose combines the whole setup (database, weblate app, etc.) - and the weblate app is up in seconds without any configuration - a major plus for new users.\r\n\r\nExamples for setting up docker-compose for django & databases are here:\r\nhttps://docs.docker.com/compose/django/\r\nhttps://realpython.com/blog/python/django-development-with-docker-compose-and-machine/\r\n\r\nI tried the docker file from @wichert https://github.com/wichert/docker-weblate as mentioned in https://github.com/nijel/weblate/issues/618 - however, in the end working out a connected database connection is crucial.\r\n\r\nA first shot at the docker-compose.yml is this:\r\n(move the wichert/docker-weblate folder in)\r\n\r\ndirectory structure:\r\n- docker-compose.yml\r\n- weblate-web - files from wichert/docker-weblate\r\n\r\n```\r\nweblate-web:\r\n  build: weblate-web\r\n  links:\r\n    - weblate-db\r\n  ports:\r\n    - \"8000:8000\"\r\n  volumes:\r\n    - weblate-web:/app/etc\r\n    - weblate-web:/app/data\r\n  volumes_from:\r\n    - weblate-logs-volume\r\n    - weblate-storage-volume\r\nweblate-logs-volume:\r\n  image: busybox\r\n  volumes:\r\n    - /logs\r\nweblate-storage-volume:\r\n  image: busybox\r\n  volumes:\r\n    - /storage\r\nweblate-db:\r\n  image: mysql:5.6\r\n  ports:\r\n    - \"3306:3306\"\r\n  environment:\r\n    - MYSQL_ROOT_PASSWORD=weblate\r\n    - MYSQL_USER=weblate\r\n    - MYSQL_PASSWORD=weblate\r\n    - MYSQL_DATABASE=weblatedb\r\n  volumes_from:\r\n    - weblate-db-volume\r\nweblate-db-volume:\r\n  image: busybox\r\n  volumes:\r\n    - /var/lib/mysql\r\n```\r\n\r\nthe settings.py database connection settings are as follows:\r\n```\r\nDATABASES = {\r\n    'default': {\r\n        # Use 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\r\n        'ENGINE': 'django.db.backends.mysql',\r\n        # Database name or path to database file if using sqlite3.\r\n        'NAME': 'weblatedb',\r\n        # Database user, not used with sqlite3.\r\n        'USER': 'root',\r\n        # Database password, not used with sqlite3.\r\n        'PASSWORD': 'weblate',\r\n        # Set to empty string for localhost. Not used with sqlite3.\r\n        'HOST': 'weblate-db',\r\n        # Set to empty string for default. Not used with sqlite3.\r\n        'PORT': '3306',\r\n    }\r\n}\r\n```\r\n\r\nThe database connection still seems to not work fully - it connects, but the users need to be configured accordingly. \r\n\r\n@wichert @nijel How does this look like to you? any others interested to drive this further?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25806296-create-docker-compose-file-update-dockerfile-for-rapid-test-production-deployment?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F253393&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/nijel/weblate/issues/comments/131548374","html_url":"https://github.com/nijel/weblate/issues/808#issuecomment-131548374","issue_url":"https://api.github.com/repos/nijel/weblate/issues/808","id":131548374,"user":{"login":"nijel","id":212189,"avatar_url":"https://avatars.githubusercontent.com/u/212189?v=3","gravatar_id":"","url":"https://api.github.com/users/nijel","html_url":"https://github.com/nijel","followers_url":"https://api.github.com/users/nijel/followers","following_url":"https://api.github.com/users/nijel/following{/other_user}","gists_url":"https://api.github.com/users/nijel/gists{/gist_id}","starred_url":"https://api.github.com/users/nijel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nijel/subscriptions","organizations_url":"https://api.github.com/users/nijel/orgs","repos_url":"https://api.github.com/users/nijel/repos","events_url":"https://api.github.com/users/nijel/events{/privacy}","received_events_url":"https://api.github.com/users/nijel/received_events","type":"User","site_admin":false},"created_at":"2015-08-16T13:11:56Z","updated_at":"2015-08-16T13:11:56Z","body":"Dne Sun, 16 Aug 2015 04:14:20 -0700\nmobidev111 <notifications@github.com> napsal(a):\n\n> 1) unify requirements.py: merge / unify the requirements.py from https://github.com/wichert/docker-weblate/blob/master/requirements.txt into the weblate repo. they differ quite a bit. if needed add an additional requirements-docker.py to the weblate repo\n\nThe seem to mention transitional deps as well, also stick to specific\nversion, what Weblate ones do not. The requirements.txt /\nrequirements-optional.txt are always kept up to date (they are used to\nrun testsuite, so in case something would be missing, the testsuite\nwould break).\n\n> 2) create a new repo: weblate-docker\n\nWhy does it have to live in separate repository?\n\n-- \n\tMichal Čihař | http://cihar.com | http://blog.cihar.com\n"}}