2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 01:00:26 +01:00

add robots.txt files for staging and production envs

This commit is contained in:
Frederik Ring 2019-09-29 16:08:41 +02:00
parent f53ae00a0e
commit cc8eab4394
6 changed files with 17 additions and 7 deletions

View File

@ -178,12 +178,14 @@ jobs:
if [ "${CIRCLE_BRANCH}" == "master" ]; then
export SITEURL="https://www.offen.dev"
export DOCKER_IMAGE_TAG="stable"
export ROBOTS_FILE="robots.txt.production"
else
export SITEURL="https://staging.offen.dev"
export DOCKER_IMAGE_TAG="latest"
export ROBOTS_FILE="robots.txt.staging"
fi
docker build -t offen/server:$DOCKER_IMAGE_TAG -f build/server/Dockerfile .
docker build --build-arg siteurl=$SITEURL -t offen/proxy:$DOCKER_IMAGE_TAG -f build/proxy/Dockerfile .
docker build --build-arg siteurl=$SITEURL --build-arg robots=$ROBOTS_FILE -t offen/proxy:$DOCKER_IMAGE_TAG -f build/proxy/Dockerfile .
- run:
name: Save Docker image layer cache
command: |

View File

@ -32,10 +32,11 @@ bootstrap:
@echo ""
DOCKER_IMAGE_TAG ?= latest
ROBOTS_FILE ?= robots.txt.staging
build:
@docker build -t offen/server:${DOCKER_IMAGE_TAG} -f build/server/Dockerfile .
@docker build --build-arg siteurl=${SITEURL} -t offen/proxy:${DOCKER_IMAGE_TAG} -f build/proxy/Dockerfile .
@docker build --build-arg siteurl=${SITEURL} --build-arg robots=${ROBOTS_FILE} -t offen/proxy:${DOCKER_IMAGE_TAG} -f build/proxy/Dockerfile .
secret:
@docker-compose run server make secret

View File

@ -1,6 +1,5 @@
# offen
[![CircleCI](https://circleci.com/gh/offen/offen/tree/master.svg?style=svg)](https://circleci.com/gh/offen/offen/tree/master)
[![Pivotal Tracker](https://img.shields.io/static/v1.svg?label=Project+Planning&message=Pivotal+Tracker&color=informational)](https://www.pivotaltracker.com/n/projects/2334535)
[![Patreon](https://img.shields.io/static/v1.svg?label=patreon&message=donate&color=e85b46)](https://www.patreon.com/offen)
> The offen analytics software
@ -11,9 +10,7 @@ This repository contains all source code needed to build and run __offen__, both
Development of __offen__ has just started, so instructions are rare and things will stay highly volatile for quite some while.
Guidelines for running and developing the Software will be added when it makes sense to do so.
Project planning and issue tracking is done using [Pivotal Tracker](https://www.pivotaltracker.com/n/projects/2334535), but feel free to open a GitHub issue if you have a question or found a bug.
Guidelines for running and developing the Software will be added when it makes sense to do so. If you have questions in the meantime, feel free to open an issue.
### Developing the application
@ -25,7 +22,7 @@ After cloning the repository, you can build the containers and install dependenc
$ make setup
```
Next, create a local encryption key for the `kms` service and seed the database for the `server` application:
Next seed the database for the `server` application:
```sh
$ make bootstrap

View File

@ -58,11 +58,16 @@ RUN pip install --user -r requirements.txt
RUN make publish
FROM nginx:1.17-alpine
LABEL maintainer="mail@offen.dev"
ARG robots
ENV ROBOTS_FILE=$robots
COPY --from=homepage /code/homepage/output /www/data
COPY --from=script /code/script/dist /www/data
COPY --from=auditorium /code/auditorium/dist /www/data/auditorium
COPY --from=vault /code/vault/dist /www/data/vault
COPY ./build/proxy/$ROBOTS_FILE /www/data/robots.txt
COPY ./build/proxy/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80

View File

@ -0,0 +1,3 @@
User-agent: *
Disallow: /vault/
Disallow: /auditorium/

View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /