merge to update docker and git pipeline

This commit is contained in:
Idaapayo 2021-09-22 12:02:31 +03:00
commit 536b1cf90e
4 changed files with 32 additions and 0 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
pelican
__pycache__
*.pyc
*.o
output/
node_modules/
.venv/

18
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,18 @@
stages:
- build
- test
- deploy
image: docker:19.03.12
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
build:
stage: build
tags:
- integration
script:
- docker build -t $CI_REGISTRY_IMAGE:${TAG:-latest} .
- docker push $CI_REGISTRY_IMAGE:${TAG:-latest}

View File

@ -16,4 +16,6 @@ FROM openresty/openresty:buster-fat
COPY --from=build /app/output /var/www/pelican/output/
EXPOSE 80
COPY nginx.conf /etc/nginx/conf.d/default.conf

View File

@ -10,5 +10,10 @@ source env/bin/activate
pip install -r requirements.txt
make devserver
```
## With Docker
docker build -t ge-blog .
docker run -p 8000:80 ge-blog