Starting Django project with Docker

瀏覽次數:193 次
跳到第一則未讀訊息

Prabakaran Balaji

未讀,
2022年9月26日 上午8:12:562022/9/26
收件者:django...@googlegroups.com
Hello Django Geeks,

Looking for geeks' insight for docker related issues. I'm not able to run the command "docker-compose run --rm app sh -c "django-admin startproject app ."

Error - 
Traceback (most recent call last):
  File "/py/bin/django-admin", line 8, in <module>
    sys.exit(execute_from_command_line())
  File "/py/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/py/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/py/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/py/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/py/lib/python3.9/site-packages/django/core/management/commands/startproject.py", line 21, in handle
    super().handle('project', project_name, target, **options)
  File "/py/lib/python3.9/site-packages/django/core/management/templates.py", line 160, in handle
    with open(new_path, 'w', encoding='utf-8') as new_file:
PermissionError: [Errno 13] Permission denied: '/app/manage.py'

Attaching docker related files and directory structure screenshot.
image.png


Will be waiting for your valuable inputs.

docker-compose.yml
Dockerfile

Makrand

未讀,
2022年9月26日 上午8:58:492022/9/26
收件者:django...@googlegroups.com
I can handle cloud related work


From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Prabakaran Balaji <prabu...@gmail.com>
Sent: Monday, September 26, 2022 5:41:30 PM
To: django...@googlegroups.com <django...@googlegroups.com>
Subject: Starting Django project with Docker
 
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK7fxT-m%3D5LMFF%2ByikZ6571eSo3xMuyc6ZGDtLtrE4fd_naz%2BA%40mail.gmail.com.

Yeboah Dominic

未讀,
2022年9月26日 上午8:59:072022/9/26
收件者:django...@googlegroups.com
I think you have to give that user permission.
Like 'sudo chown -R root:root /home/dominic/app' or sudo chown -R dominic:dominic /home/dominic/app


 

Makrand

未讀,
2022年9月26日 上午9:02:052022/9/26
收件者:django...@googlegroups.com
My number is+91 99301 02832
From: django...@googlegroups.com <django...@googlegroups.com> on behalf of Yeboah Dominic <yebo...@gmail.com>
Sent: Monday, September 26, 2022 10:27:31 PM
To: django...@googlegroups.com <django...@googlegroups.com>
Subject: Re: Starting Django project with Docker
 

sham khan

未讀,
2022年9月26日 上午9:16:362022/9/26
收件者:Django users
You need to assign a permission(chown of the folder /app)

Prabakaran Balaji

未讀,
2022年9月27日 清晨5:37:042022/9/27
收件者:django...@googlegroups.com、shamim...@gmail.com、yebo...@gmail.com
Hello Folks,

I tried to set the permission on app directory, but still facing the same problem. Any additional thoughts?
image.png


Thanks and regards,
Prabakaran


Kasper Laudrup

未讀,
2022年9月27日 上午8:51:062022/9/27
收件者:django...@googlegroups.com
On 27/09/2022 11.35, Prabakaran Balaji wrote:
> Hello Folks,
>
> I tried to set the permission on app directory, but still facing the
> same problem. Any additional thoughts?

Which permission did you set? It looks like you set the owner of the app
directory to your user.

Is your user the same as the one running the app?
Which directory are you trying to write to?
Is it the same as the application directory?
The user running the app needs write permissions to that directory.

Do you know the basics of Unix permissions? Otherwise that might be a
good place to start:

https://www.softwaretestinghelp.com/unix-permissions/

This was just the first link I found but it looks OK.

If you do already know how Unix permissions work you need to dig a bit
more into which permissions are actually being required instead of just
setting them blindly and hoping it works.

Kind regards,

Kasper Laudrup

amruth bitla

未讀,
2022年9月27日 上午10:41:372022/9/27
收件者:django...@googlegroups.com
I really want to start with docker with atleast 2 to 5 guys

Kazuya Nomura

未讀,
2022年9月28日 上午9:41:082022/9/28
收件者:Django users
Please add me
If you could please add my git account in your project.

Jishnu C K

未讀,
2022年10月3日 下午3:14:292022/10/3
收件者:django...@googlegroups.com
https://medium.com/me/stats/post/58f063097f43

Django: Rendering custom models dynamically using generators.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
回覆所有人
回覆作者
轉寄
0 則新訊息