Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Website Solution: Create a new app to serve a directory with caddy #2088

Closed
AhmedHanafy725 opened this issue Jan 30, 2024 · 16 comments
Closed
Assignees
Labels
playground type_feature New feature or request
Milestone

Comments

@AhmedHanafy725
Copy link
Contributor

  • Create a docker image containing caddy, git, and zinit inside.
  • This image should take the git url and clone the repo.
  • Serve whatever is in the repo with caddy server.
  • Convert this image to a flist.
  • Use this flist and create a new app in the dashboard.
@AhmedHanafy725 AhmedHanafy725 added type_feature New feature or request playground labels Jan 30, 2024
@ramezsaeed ramezsaeed added this to the 2.4.0 milestone Jan 31, 2024
@xmonader xmonader changed the title Create a new app to serve a directory with caddy Static Website Solution: Create a new app to serve a directory with caddy Jan 31, 2024
@maayarosama maayarosama moved this to In Progress in 3.14.x Feb 5, 2024
@maayarosama
Copy link
Contributor

  1. Work Completed:
    A docker image was successfully created

  2. Work in Progress (WIP):
    All zinit errors are resolved now, and every process is successful. Next step is converting the image to an flist and test against a vm

@maayarosama maayarosama moved this from In Progress to Accepted in 3.14.x Feb 8, 2024
@maayarosama
Copy link
Contributor

Work Completed:
Converted The image to an flist and tested it against a vm and can ssh to the machine

Investigation and Solution:
The following errors need investigation

[+] caddy: {"level":"warn","ts":1709465488.7981684,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"Caddyfile","line":4}

[+] caddy: {"level":"info","ts":1709465488.8023553,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}

@maayarosama maayarosama moved this from Accepted to In Progress in 3.14.x Mar 7, 2024
@maayarosama maayarosama moved this from In Progress to Accepted in 3.14.x Mar 7, 2024
@maayarosama maayarosama moved this from Accepted to In Progress in 3.14.x Mar 10, 2024
@maayarosama
Copy link
Contributor

maayarosama commented Mar 12, 2024

Work Completed:

  • Fixed docker image (Fixed caddyfile, fixed caddy zinit process, added a domain zinit process) 8
  • Once caddy image tf-images#218 pr is merged the image and Flist must be upgraded to an official ones
  • Docker image
  • Flist

Work in Progress (WIP):

  • A solution for caddy should be added in the dashboard

@maayarosama
Copy link
Contributor

Work Completed:

  • Added a solution in the dashboard

Work in Progress (WIP):

  • Adding a readme file in info-grid

Investigation and Solution:

  • (dashboard issue) whenever a domain is added to the deployed instance it produces a bad gateway unlike using a public ip which serves the files correctly

@maayarosama
Copy link
Contributor

maayarosama commented Mar 20, 2024

Work Completed:

  • Added a solution in the dashboard
  • Updated caddy image
    Work in Progress (WIP):

Adding a readme file in info-grid
Investigation and Solution:

  • testing with a custom domain

@maayarosama maayarosama moved this from In Progress to Pending Review in 3.14.x Mar 24, 2024
@maayarosama maayarosama moved this from Pending Review to In Progress in 3.14.x Mar 24, 2024
@maayarosama
Copy link
Contributor

Work Completed:

Work in Progress (WIP):

  • Docker Updates

    • Remove node from docker image if not needed
    • Add branch flag
    • Pulling policy (not prio)
    • Ports should be default ports not 9000
    • separate caddy run into it's own service
    • Remove ssh service as zos takes care of it
    • add a bash script for caddyfile construction and execute it in the zinit service
  • Dashboard Updates

    • change title html directory
    • check if you can add ip while using custom domain

@maayarosama maayarosama moved this from In Progress to Accepted in 3.14.x Mar 24, 2024
@maayarosama maayarosama moved this from Accepted to In Progress in 3.14.x Mar 27, 2024
@maayarosama
Copy link
Contributor

Work Completed:

  • Docker Updates

    • Remove node from docker image if not needed
    • separate caddy run into it's own service
    • Add branch service
  • Dashboard Updates

    • change title to html directory
    • check if you can add ip while using custom domain

Work in Progress (WIP):

  • Docker Updates
    • Remove sshkey service as zos takes care of it
    • Pulling policy (not prio)
    • Ports should be default ports not 9000
    • add a bash script for caddyfile construction and execute it in the zinit service

@maayarosama
Copy link
Contributor

Work in Progress (WIP):

Trying to use caddy git plugin for pulling policy

@maayarosama maayarosama moved this from In Progress to Accepted in 3.14.x Apr 2, 2024
@maayarosama
Copy link
Contributor

Work in Progress (WIP):

  • Working on comments on the pr
  • will be using crone jobs for the pulling policy instead of the plugin

@maayarosama maayarosama moved this from Accepted to In Progress in 3.14.x Apr 14, 2024
@xmonader xmonader modified the milestones: 2.4.0, 2.5.0 Apr 14, 2024
@maayarosama maayarosama moved this from In Progress to Accepted in 3.14.x Apr 15, 2024
@maayarosama maayarosama moved this from Accepted to Pending Review in 3.14.x Apr 21, 2024
@amiraabouhadid amiraabouhadid moved this from Pending Review to In Verification in 3.14.x May 16, 2024
@A-Harby
Copy link
Contributor

A-Harby commented May 27, 2024

Devnet, 51f43a7.

The action button is empty.

image

And the docs need to be updated to the latest changes.

image

@A-Harby A-Harby moved this from In Verification to Accepted in 3.14.x May 27, 2024
@maayarosama maayarosama moved this from Accepted to Pending Review in 3.14.x May 27, 2024
@maayarosama maayarosama moved this from Pending Review to In Verification in 3.14.x May 27, 2024
@maayarosama
Copy link
Contributor

can we Upgrade the Flist to an official one? @hossnys @PeterNashaat

@hossnys
Copy link

hossnys commented May 28, 2024

there is a comment on your PR for that image here , then we can ask Maxime for promoting it to official apps on hub .

@maayarosama
Copy link
Contributor

there is a comment on your PR for that image here , then we can ask Maxime for promoting it to official apps on hub .

Comments are resolved now, the pr should be reviewed and merged

@hossnys
Copy link

hossnys commented May 29, 2024

@maayarosama another comment there please check threefoldtech/tf-images#218 (comment)

@hossnys
Copy link

hossnys commented May 29, 2024

@maayarosama PR approved

@khaledyoussef24
Copy link
Contributor

khaledyoussef24 commented Jun 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
playground type_feature New feature or request
Projects
Status: Done
Development

No branches or pull requests

7 participants