i want to know how can i add a picture in my project
when i add a attachments in my project
just like this:
Hi there,
I’m assuming you are running a self-hosted installation, right? Are you using docker or installing from source? If you are using docker, is it the official docker-compose installation or a third-party one?
This seems to be an issue with the media-protected component, looking at the symptoms.
Best regards!
Hi Charlie:
thank for your reply, i am using official docker-compose installation.
what should i do to resolve this problem?
Please share your nginx logs and your taiga-back
and taiga-protected
logs.
I did not configure the proxy
I checked taiga-back and taga-protected logs,there are no changes
hi:
i really need your help
Why did you not configure the proxy?
Have you checked the settings inside the taiga-protected container?
Can you share all your settings and logs, making sure to obfuscate any sensitive data?
Best regards!
hi Charlie:
this is my taiga.conf(the one in the taiga-gateway)
server {
listen 80 default_server;
client_max_body_size 100M;
charset utf-8;
# Frontend
location / {
proxy_pass http://taiga-front/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
# API
location /api/ {
proxy_pass http://taiga-back:8000/api/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
# Admin
location /admin/ {
proxy_pass http://taiga-back:8000/admin/;
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
}
# Static
location /static/ {
alias /taiga/static/;
}
# Media
location /_protected/ {
internal;
alias /taiga/media/;
add_header Content-disposition "attachment";
}
# Unprotected section
location /media/exports/ {
alias /taiga/media/exports/;
add_header Content-disposition "attachment";
}
location /media/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://taiga-protected:8003/;
proxy_redirect off;
}
# Events
location /events {
proxy_pass http://taiga-events:8888/events;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
}
}
hi Charlie:
this is my taiga-protected setting
SECRET_KEY=taiga-back-secret-key
MAX_AGE=300
TAIGA_SUBPATH=
and this is my taiga_protected container logs:
Starting Taiga Protected
[2024-08-13 07:20:39 +0000] [1] [INFO] Starting gunicorn 19.9.0
[2024-08-13 07:20:39 +0000] [1] [INFO] Listening at: http://0.0.0.0:8003 (1)
[2024-08-13 07:20:39 +0000] [1] [INFO] Using worker: sync
[2024-08-13 07:20:39 +0000] [15] [INFO] Booting worker with pid: 15
[2024-08-13 07:20:39 +0000] [16] [INFO] Booting worker with pid: 16
[2024-08-13 07:20:39 +0000] [17] [INFO] Booting worker with pid: 17
[2024-08-13 07:20:39 +0000] [18] [INFO] Booting worker with pid: 18
[2024-10-25 03:50:42 +0000] [1] [INFO] Handling signal: term
[2024-10-25 03:50:42 +0000] [15] [INFO] Worker exiting (pid: 15)
[2024-10-25 03:50:42 +0000] [18] [INFO] Worker exiting (pid: 18)
[2024-10-25 03:50:42 +0000] [17] [INFO] Worker exiting (pid: 17)
[2024-10-25 03:50:42 +0000] [16] [INFO] Worker exiting (pid: 16)
[2024-10-25 03:50:43 +0000] [1] [INFO] Shutting down: Master
Give permission to taiga:taiga
Starting Taiga Protected
[2024-10-25 03:50:44 +0000] [1] [INFO] Starting gunicorn 19.9.0
[2024-10-25 03:50:44 +0000] [1] [INFO] Listening at: http://0.0.0.0:8003 (1)
[2024-10-25 03:50:44 +0000] [1] [INFO] Using worker: sync
[2024-10-25 03:50:44 +0000] [15] [INFO] Booting worker with pid: 15
[2024-10-25 03:50:44 +0000] [16] [INFO] Booting worker with pid: 16
[2024-10-25 03:50:44 +0000] [17] [INFO] Booting worker with pid: 17
[2024-10-25 03:50:44 +0000] [18] [INFO] Booting worker with pid: 18
How are you accesing your containers?
Does your network tab show any errors?
Are you using a local IP or a hostname?
Please also share your .env file, obfuscating any personal/private info (though please do indicate where have you done so so that we can make assumptions on what is correct or incorrect).
Best regards!
i used docker to install taiga, my network tab doesn’t show any errors, i am using a hostname ,my taiga show everything ok,just can’t upload image
this is my .env file:
Taiga’s URLs - Variables to define where Taiga should be served
TAIGA_SCHEME=http # serve Taiga using “http” or “https” (secured) connection
TAIGA_DOMAIN=192.xxx.x.xx:7040 # Taiga’s base URL
SUBPATH=“” # it’ll be appended to the TAIGA_DOMAIN (use either “” or a “/subpath”)
WEBSOCKETS_SCHEME=ws # events connection protocol (use either “ws” or “wss”)
Taiga’s Secret Key - Variable to provide cryptographic signing
SECRET_KEY=“sunitec-taiga-secret-key” # Please, change it to an unpredictable value!!
Taiga’s Database settings - Variables to create the Taiga database and connect to it
POSTGRES_USER=taiga # user to connect to PostgreSQL
POSTGRES_PASSWORD=taiga # database user’s password
Taiga’s SMTP settings - Variables to send Taiga’s emails to the users
EMAIL_BACKEND=console # use an SMTP server or display the emails in the console (either “smtp” or “console”)
EMAIL_HOST=smtp.host.example.com # SMTP server address
EMAIL_PORT=587 # default SMTP port
EMAIL_HOST_USER=user # user to connect the SMTP server
EMAIL_HOST_PASSWORD=password # SMTP user’s password
EMAIL_DEFAULT_FROM=changeme@example.com # default email address for the automated emails
EMAIL_USE_TLS/EMAIL_USE_SSL are mutually exclusive (only set one of those to True)
EMAIL_USE_TLS=True # use TLS (secure) connection with the SMTP server
EMAIL_USE_SSL=False # use implicit TLS (secure) connection with the SMTP server
Taiga’s RabbitMQ settings - Variables to leave messages for the realtime and asynchronous events
RABBITMQ_USER=taiga # user to connect to RabbitMQ
RABBITMQ_PASS=taiga # RabbitMQ user’s password
RABBITMQ_VHOST=taiga # RabbitMQ container name
RABBITMQ_ERLANG_COOKIE=secret-erlang-cookie # unique value shared by any connected instance of RabbitMQ
Taiga’s Attachments - Variable to define how long the attachments will be accesible
ATTACHMENTS_MAX_AGE=360 # token expiration date (in seconds)
Taiga’s Telemetry - Variable to enable or disable the anonymous telemetry
ENABLE_TELEMETRY=True
hi
what should i do next step?
Hi!
Does the give permissions to taiga:taiga
repeat often in your taiga-protected logs?
Best regards!
i have restarted taiga-protected container a few times,
Hi there,
It does indeed repeat often. The service restarts continuously because the user and group taiga
do not have permissions on your attachments folder. If you are using the default, official docker installation, that should be in /var/lib/docker/volumes/taiga-docker_taiga-media-data/
.
Please check your permissions there, for example by doing ls -lah /var/lib/docker/volumes/taiga-docker_taiga-media-data/
Best regards!
thank for your help ,but it’s not working, i changed taiga-media-data folder permission, just do this : chmod -R 777 taiga-media-data, did i wrong? what should i do next ?thank you
Please share the logs again, after having changed the permissions.
Best regards!