Skip to content

Commit

Permalink
functional web deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
wassfila committed Apr 14, 2024
1 parent 24445b9 commit 9c2c04b
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```
16 changes: 14 additions & 2 deletions containers/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions containers/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 9c2c04b

Please sign in to comment.