{"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":5,"created_at":"2015-08-15T19:31:15Z","updated_at":"2015-08-16T13:27:22Z","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/131549876","html_url":"https://github.com/nijel/weblate/issues/808#issuecomment-131549876","issue_url":"https://api.github.com/repos/nijel/weblate/issues/808","id":131549876,"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:27:22Z","updated_at":"2015-08-16T13:27:22Z","body":"Dne Sun, 16 Aug 2015 06:21:43 -0700\nWichert Akkerman <notifications@github.com> napsal(a):\n\n> My rule for deployments is that they should always list all dependencies, both direct and indirect, with exact versions in order to insure deployments are testable and reproducible. Otherwise you often run into a problem where rebuilding the exact same environment results in a broken system.\n\nOkay, this makes sense for the deployment, I just did not realize that.\n\n-- \n\tMichal Čihař | http://cihar.com | http://blog.cihar.com\n"}}