diff --git a/README.md b/README.md index 7cbf11a..2b016f4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,28 @@ # website_content testing deployment with content only website -act --input ACT=true --container-options "-v ~/dist:/mnt/act_dist" -act --input-file .env --container-options "-v ~/dist:/mnt/act_dist" +## usage + +initialise by fetching services dockerfiles with + +```shell +run init +``` +this will populate `./containers/dockerfiles` with the list from `./containers/seeds/seeds.yaml` + +then build using astro-big-doc repo with + +```shell +run build +``` +this will take as input that will be mapped as volumes +- ./content +- ./public +- ./menu.yaml + +and will generate the build in the `./dist` folder + +then test by deploying a server on http://localhost +```shell +run server +``` diff --git a/containers/docker-compose.yaml b/containers/docker-compose.yaml index 3b1b8ef..c3adbe1 100644 --- a/containers/docker-compose.yaml +++ b/containers/docker-compose.yaml @@ -17,5 +17,17 @@ services: - ../menu.yaml:/astro-big-doc/menu.yaml - ../dist:/astro-big-doc/dist ports: - - "3001:3001" - - "4321:4321" + - 3001:3001 + - 4321:4321 + apache: + image: httpd:latest + volumes: + - ../dist:/usr/local/apache2/htdocs/ + ports: + - 8080:80 + nginx: + image: nginx:latest + volumes: + - ../dist:/usr/share/nginx/html + ports: + - 80:80 diff --git a/containers/run.py b/containers/run.py index 9094025..95fb4f2 100644 --- a/containers/run.py +++ b/containers/run.py @@ -19,3 +19,7 @@ subprocess.run(["docker-compose", "run", "--rm", "astro-big-doc", "build"]) elif(command == "init"): subprocess.run(["docker-compose", "run", "--rm", "seeds"]) +elif(command == "apache"): + subprocess.run("docker-compose up apache", shell=True, check=True) +elif(command == "server"): + subprocess.run("docker-compose up nginx", shell=True, check=True)