2
0
mirror of https://github.com/offen/website.git synced 2024-10-18 12:10:25 +02:00

configure production environment

This commit is contained in:
Frederik Ring 2019-09-11 12:44:51 +02:00
parent 564ff3ad30
commit e40af3912a
8 changed files with 26 additions and 12 deletions

View File

@ -23,9 +23,10 @@ jobs:
docker:
- image: circleci/golang:1.12
environment:
- POSTGRES_CONNECTION_STRING=postgres://circle:test@localhost:5432/circle_test?sslmode=disable
- PORT=8080
- EVENT_RETENTION_PERIOD=4464h
POSTGRES_CONNECTION_STRING: postgres://circle:test@localhost:5432/circle_test?sslmode=disable
PORT: 8080
EVENT_RETENTION_PERIOD: 4464h
COOKIE_EXCHANGE_SECRET: VswgMshC4mPDfey8o+yScg==
- image: circleci/postgres:11.2-alpine
environment:
- POSTGRES_USER=circle
@ -151,6 +152,9 @@ jobs:
build:
docker:
- image: docker:18-git
environment:
SITEURL: https://www.offen.dev
DOCKER_TAGE: stable
working_directory: ~/offen
steps:
- checkout
@ -200,7 +204,9 @@ jobs:
sudo pip install awsebcli --upgrade
- run:
name: Deploying
command: eb deploy
command: |
cp Dockerrun.aws.json.production Dockerrun.aws.json
eb deploy
workflows:
version: 2

View File

@ -1,6 +1,8 @@
branch-defaults:
local-proxy:
environment: production
master:
environment: staging
environment: production
group_suffix: null
global:
application_name: offen

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ package-lock.json
venv/
bootstrap-alpha.yml
Dockerrun.aws.json

View File

@ -4,7 +4,7 @@
"containerDefinitions": [
{
"name": "proxy",
"image": "offen/proxy:latest",
"image": "offen/proxy:stable",
"essential": true,
"memory": 128,
"portMappings": [
@ -23,9 +23,9 @@
},
{
"name": "server",
"image": "offen/server:latest",
"image": "offen/server:stable",
"essential": true,
"memory": 128
"memory": 256
}
]
}

View File

@ -22,9 +22,11 @@ bootstrap:
@echo "Bootstrapping Server service ..."
@docker-compose run server make bootstrap
DOCKER_IMAGE_TAG ?= latest
build:
@docker build -t offen/server:latest -f build/server/Dockerfile .
@docker build -t offen/proxy:latest -f build/proxy/Dockerfile .
@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 .
secret:
@docker-compose run server make secret

View File

@ -9,7 +9,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. Also __do not use the software in its current state__ as it is still missing crucial pieces in protecting the data end to end.
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.

View File

@ -43,6 +43,9 @@ RUN npm run build
FROM nikolaik/python-nodejs:python3.6-nodejs10 as homepage
ARG siteurl
ENV SITEURL=$siteurl
COPY ./homepage /code/homepage
COPY ./styles /code/styles

View File

@ -11,7 +11,7 @@ sys.path.append(os.curdir)
from pelicanconf import *
# If your site is available via HTTPS, make sure SITEURL begins with https://
SITEURL = os.environ.get('PELICAN_SITEURL', 'https://www.offen.dev')
SITEURL = os.environ.get('SITEURL', 'https://www.offen.dev')
# RELATIVE_URLS = True
FEED_ALL_ATOM = 'feeds/all.atom.xml'