I would like to get the build badge image on my project from Gitlab CI. I know the url (documentation) :
http://example.gitlab.com/namespace/project/badges/branch/build.svg
But my project is a private project, and the link require authentification and I don't know how to be authenticated with this url.
Thank you for your help.
Your project/repository's README.md should be able to show your badge as it's already in an authenticated session with your/the Gitlab server. If your trying to show the badge on a different, non-Gitlab page on the same server, you could symlink the build.svg to a location in your www root and ensure that your other webserver to follow symlinks.
Related
I want to host a static web app containing HTML/CSS/JS only and some interlinking between HTML pages.
I am successfully able to access the app if I make the bucket public but I don't want to make the app public and I want that only authenticated users (People of the organization) can access that app.
When I make it private then CSS/JS stops working because the index.html can not access those files due to permission issue.
How to achieve this?
As said by John, you can't achieve this with Cloud Storage. However you can use App Engine standard with IAP.
For this, get your sources and build a app.yaml file with this content
runtime: python3
handlers:
- url: /stylesheets
static_dir: stylesheets
- url: /statics
static_dir: statics
- url: /.*
script: index.html
Then deploy it gcloud app deploy
Then, go to identity aware proxy page and activate IAP for your App Engine service.
Finally, you can select your App Engine service, go on the info panel on the right and click on add member. You can add a single user, a group or a company. (all needs to have a Google Account. Works well with Google Workspace company for example); and add the role IAP secured Web App user
You can solve this by adding the <base> tag inside <head>:
<base href="https://storage.cloud.google.com/<bucket>/path/to/site/root/"/>
Normal CSS and JS will work.
However calling fetch to load additional files might not work due to CORS.
So here's my situation...I have two React apps that need to talk to the same Cognito User Pool. I've been able to accomplish this by copying the aws-exports.js file from the first app to the second app I created (not sure if this is something I should be doing or not but it is working). The issue I am having however is when I run an Admin Query on the second app (to say list users in the Cognito User Pool) I get a 403 (Forbidden) error. Has anyone ever run into this before? Googling all day has not helped me so I figured I would ask.
You'll need "multi-frontend" solution:
https://docs.amplify.aws/cli/teams/multi-frontend
I'll give you some useful infos for this:
Open the Amplify Console and there the "first" app (wheres the backend was created).
Go to the first app's "backend" section
Select "Backend environments" tab
Search for "Edit backend" box and this text: "To continue working on the backend, install the Amplify CLI and make updates by running the command below from the root of your project folder"
copy that command, and paste/run in second app's root.
Beware!
do not modify (and push) the backend from the second application.
if you use git branch based environment you must always switch the env AND the branch parallel. Do not pull the "master" backend for your "dev" env.
try to avoid modifing on amplify console if you modify things with amplify cli. Those things cannot be syncronized... :(
If you store multiple apps in a git monorepo:
https://docs.amplify.aws/cli/usage/monorepo
I have followed all instructions of deploying React app to AWS S3. Uploaded all files and folders in bucket, but, when clicked on site endpoint in Static Website Hosting shows blank page.What may be the cause? Please see following images for reference
All files and folders uploaded
Static Website Hosting in properties also updated
Public access also enabled
Bucket Policy also updated
Blank Page
This is all required for React App to deploy on AWS S3. Any suggestions?
Fetching index.html works fine, but the various JavaScript files are all yielding 404.
The problem appears to be that your HTML is fetching resources as:
/WeatherApp/static/js/main.057efd26.chunk.js
but in the origin they are actually at:
/static/js/main.057efd26.chunk.js
Fix your index.html to refer to static resources rooted at /static/, not /WeatherApp/static/.
In package.json file, change homepage to: "homepage": "./"
npm run build
re-upload these build files.
I created a static website using Hugo and I don't know how to host it on github. The documentation on their website didn't help me.
After finishing my website, I created the public folder which contains in theory all the files needed for the website (whith this command : hudo -t hyde-hyde). When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
How should I porceed to generate correctly my website and host it on github ? Thanks.
How to create with HUGO
If you have a problem while creating your site, check this tutorial.
How to Host HUGO website on GitHub (Pages)
Check this LINK where it shows you step by step all the procedures to host HUGO on GitHub, on both User/Organization Pages and on Project Pages.
Check list:
When I open index.html with chrome I only see the content of my website without the theme. Is it normal ?
I know it might seem a little too obvious, but check the spelling. Sometimes you spend hours trying to find the error and it's just a typo, this case in the theme you wanted to.
Have you tried another browser? It might not be the case, but checking it will get you out of doubt, also remember to delete the cache just in case.
Then I moved all the files within the public folder into my gihub repo username.github.io/ , but I can't see any result (I can only see my previous commit which is a simple Hello World).
Do you have a User/Organization Page (syntax: username.github.io) or a Project Page (syntax: username.github.io/project)?
UPDATE 1: Follow the instructions on this video for hosting on GitHub if unclear.
Could you add a link to your repo? Thanks.
[Update]
I've managed to upload a small file (but not yet a large image). ../media/filer_public/ sub-directories are being correctly created and file correctly uploaded. Need to investigate nginx configurations.
[OP]
I've logged into a new Django CMS system as superuser but cannot Add filer image or Add filer file to a page as the file upload silently fails; very briefly flashing its upload graphics but not actually uploading anything. I believe all the settings.py are correct as static artifacts are rendered correctly and Nginx has credible similar locations for both media and static directories.
I believe all file and directory permissions and ownerships are correct; i.e. that Nginx has user and / or group ownership of the Django CMS app directories and that permissions are correct.
The Postgres table filer_folder has a row for a new filer folder I created when editing a page but no corresponding directory has been created in the file system. I can add text and new text block plugins that get saved correctly.
Django CMS is running in a Docker container web which I have confirmed has rw (read/write) access to a Docker volume.
I see nothing abnormal in webs logs.
How can I find out what's (not) happening?
Simply adding client_max_body_size 10M; to the nginx configuration for the site solved the issue.
Similar issues were addressed in Stackoverflow and elsewhere:
Server Fault
Setting up Django and your web server with uWSGI and nginx