2
0
mirror of https://github.com/offen/website.git synced 2024-11-22 09:00:28 +01: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: docker:
- image: circleci/golang:1.12 - image: circleci/golang:1.12
environment: environment:
- POSTGRES_CONNECTION_STRING=postgres://circle:test@localhost:5432/circle_test?sslmode=disable POSTGRES_CONNECTION_STRING: postgres://circle:test@localhost:5432/circle_test?sslmode=disable
- PORT=8080 PORT: 8080
- EVENT_RETENTION_PERIOD=4464h EVENT_RETENTION_PERIOD: 4464h
COOKIE_EXCHANGE_SECRET: VswgMshC4mPDfey8o+yScg==
- image: circleci/postgres:11.2-alpine - image: circleci/postgres:11.2-alpine
environment: environment:
- POSTGRES_USER=circle - POSTGRES_USER=circle
@ -151,6 +152,9 @@ jobs:
build: build:
docker: docker:
- image: docker:18-git - image: docker:18-git
environment:
SITEURL: https://www.offen.dev
DOCKER_TAGE: stable
working_directory: ~/offen working_directory: ~/offen
steps: steps:
- checkout - checkout
@ -200,7 +204,9 @@ jobs:
sudo pip install awsebcli --upgrade sudo pip install awsebcli --upgrade
- run: - run:
name: Deploying name: Deploying
command: eb deploy command: |
cp Dockerrun.aws.json.production Dockerrun.aws.json
eb deploy
workflows: workflows:
version: 2 version: 2

View File

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

1
.gitignore vendored
View File

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

View File

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

View File

@ -22,9 +22,11 @@ bootstrap:
@echo "Bootstrapping Server service ..." @echo "Bootstrapping Server service ..."
@docker-compose run server make bootstrap @docker-compose run server make bootstrap
DOCKER_IMAGE_TAG ?= latest
build: build:
@docker build -t offen/server:latest -f build/server/Dockerfile . @docker build -t offen/server:${DOCKER_IMAGE_TAG} -f build/server/Dockerfile .
@docker build -t offen/proxy:latest -f build/proxy/Dockerfile . @docker build --build-arg siteurl=${SITEURL} -t offen/proxy:${DOCKER_IMAGE_TAG} -f build/proxy/Dockerfile .
secret: secret:
@docker-compose run server make 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. 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 FROM nikolaik/python-nodejs:python3.6-nodejs10 as homepage
ARG siteurl
ENV SITEURL=$siteurl
COPY ./homepage /code/homepage COPY ./homepage /code/homepage
COPY ./styles /code/styles COPY ./styles /code/styles

View File

@ -11,7 +11,7 @@ sys.path.append(os.curdir)
from pelicanconf import * from pelicanconf import *
# If your site is available via HTTPS, make sure SITEURL begins with https:// # 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 # RELATIVE_URLS = True
FEED_ALL_ATOM = 'feeds/all.atom.xml' FEED_ALL_ATOM = 'feeds/all.atom.xml'