Verze se statikou v nginx
This commit is contained in:
parent
da5637dde0
commit
19232e13ae
|
@ -2,7 +2,8 @@ image: docker:19.03.1
|
|||
|
||||
variables:
|
||||
DOCKER_TLS_CERTDIR: "/certs"
|
||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
IMAGE_TAG_APP: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
IMAGE_TAG_NGINX: $CI_REGISTRY_IMAGE-nginx:$CI_COMMIT_REF_SLUG
|
||||
|
||||
services:
|
||||
- docker:19.03.1-dind
|
||||
|
@ -13,5 +14,7 @@ before_script:
|
|||
build:
|
||||
stage: build
|
||||
script:
|
||||
- docker build -t $IMAGE_TAG .
|
||||
- docker push $IMAGE_TAG
|
||||
- docker build -t $IMAGE_TAG_APP .
|
||||
- docker build -t $IMAGE_TAG_NGINX -f Dockerfile.nginx
|
||||
- docker push $IMAGE_TAG_APP
|
||||
- docker push $IMAGE_TAG_NGINX
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
FROM nginx
|
||||
expose 8080
|
||||
COPY nalodeni/static /opt/nalodeni-static
|
|
@ -1,21 +1,7 @@
|
|||
version: '3.4'
|
||||
version: '3.6'
|
||||
services:
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
container_name: nalodeni-nginx
|
||||
ports:
|
||||
- "80:8001"
|
||||
volumes:
|
||||
- ./deploy/nginx:/etc/nginx/conf.d
|
||||
- nalodeni_static:/static_nalodeni
|
||||
depends_on:
|
||||
- nalodeni
|
||||
|
||||
nalodeni:
|
||||
image: docker-registry.pirati.cz/to/nalodeni.pirati.cz:master
|
||||
container_name: nalodeni
|
||||
volumes:
|
||||
- nalodeni_static:/nalodeni/static_files
|
||||
image: docker-registry.pirati.cz/to/nalodeni.pirati.cz:demo2
|
||||
ports:
|
||||
- "8000"
|
||||
environment:
|
||||
|
@ -41,7 +27,13 @@ services:
|
|||
- NALODENI_AUTH_SERVER=s-https://auth.pirati.cz/auth/realms/pirati/
|
||||
- NALODENI_AUTH_CLIENT_SECRET=s-XXXXXXXXXXXXXXXXXXXX
|
||||
- NALODENI_EMAIL_RECIPIENT_GDPR=s-test@example.com
|
||||
volumes:
|
||||
nalodeni_static:
|
||||
|
||||
nginx:
|
||||
image: docker-registry.pirati.cz/to/nalodeni.pirati.cz-nginx:demo2
|
||||
ports:
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- "/var/opt/docker/nginx.conf:/etc/nginx/conf.d/nalodeni.conf"
|
||||
- ./deploy/nginx:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
- nalodeni
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ cd /nalodeni
|
|||
|
||||
python manage.py migrate
|
||||
|
||||
python manage.py collectstatic --noinput --clear
|
||||
#python manage.py collectstatic --noinput --clear
|
||||
|
||||
python manage.py loaddata nalodeni_interestregion nalodeni_topics nalodeni_skills nalodeni_counties
|
||||
|
||||
|
|
Loading…
Reference in New Issue