Skip to content

Commit 0ad492c

Browse files
committedMar 9, 2023
Modify docs service
- add entrypoint.sh to docs service - modify volumes - modify .gitignore Signed-off-by: orertrr <orertrr6207@gmail.com>
1 parent f2793ae commit 0ad492c

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
__pycache__
44
client_secret.json
55
docs_dev/site/
6+
docs_dev/.cache
67
log
78
log_docker_celery
89
setting.py

‎docker-compose.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
volumes:
1414
- $PWD/logs/nginx:/var/log/nginx
1515
- $PWD/nginx/sites:/etc/nginx/sites-available
16-
- docs-site:/var/www/docs_site/docs/
16+
- $PWD/docs_dev/site:/var/www/docs_site/docs/
1717
depends_on:
1818
- webapp
1919
- apiapp
@@ -211,10 +211,8 @@ services:
211211
- PYTHONPATH=../
212212
networks:
213213
- backend
214-
volumes:
215-
- docs-site:/app/docs_dev/site
216214
working_dir: /app/docs_dev
217-
entrypoint: ["poetry", "run", "mkdocs", "build"]
215+
entrypoint: ["./entrypoint.sh", "poetry", "run", "mkdocs", "build"]
218216

219217
memcached-prod:
220218
image: "memcached:1.6.18-alpine"

‎docs_dev/entrypoint.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
apk add git
4+
git config --global user.email "volunteer@coscup.org"
5+
git config --global user.name "COSCUP Volunteer"
6+
git config --global --add safe.directory /app/docs_dev
7+
git init
8+
git add .
9+
git commit -m 'init'
10+
11+
exec "$@"

0 commit comments

Comments
 (0)
Please sign in to comment.