mirror of
https://github.com/offen/website.git
synced 2024-12-27 06:50:22 +01:00
commit
f855fc175f
@ -93,7 +93,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
- run:
|
- run:
|
||||||
name: Run database migrations
|
name: Run database migrations
|
||||||
command: docker run -it offen/offen:$DOCKER_IMAGE_TAG migrate -conn $(aws secretsmanager get-secret-value --secret-id $TARGET_ENVIRONMENT/postgresConnectionString | jq -r '.SecretString')
|
command: docker run -it offen/offen:offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d migrate -conn $(aws secretsmanager get-secret-value --secret-id $TARGET_ENVIRONMENT/postgresConnectionString | jq -r '.SecretString')
|
||||||
- run:
|
- run:
|
||||||
name: Deploy
|
name: Deploy
|
||||||
command: |
|
command: |
|
||||||
|
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
homepage/output
|
@ -1,3 +1,6 @@
|
|||||||
FROM python:3.7
|
FROM nikolaik/python-nodejs:python3.7-nodejs12
|
||||||
|
|
||||||
|
RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0
|
||||||
|
|
||||||
ENV PATH="/root/.local/bin:$PATH"
|
ENV PATH="/root/.local/bin:$PATH"
|
||||||
|
ENV NODE_PATH="/usr/lib/node_modules"
|
||||||
|
@ -37,19 +37,6 @@
|
|||||||
"environment": [
|
"environment": [
|
||||||
{ "name": "OFFEN_SERVER_REVERSEPROXY", "value": "1" }
|
{ "name": "OFFEN_SERVER_REVERSEPROXY", "value": "1" }
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "logspout",
|
|
||||||
"image": "gliderlabs/logspout:latest",
|
|
||||||
"essential": true,
|
|
||||||
"memory": 64,
|
|
||||||
"command": ["syslog+tls://$LOG_TARGET"],
|
|
||||||
"mountPoints": [
|
|
||||||
{
|
|
||||||
"sourceVolume": "log-socket",
|
|
||||||
"containerPath": "/var/run/docker.sock"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,14 @@ ENV SITEURL=$siteurl
|
|||||||
|
|
||||||
COPY ./homepage /code/homepage
|
COPY ./homepage /code/homepage
|
||||||
|
|
||||||
RUN npm install svgo -g
|
RUN npm install -g postcss-cli@^6.1.3 autoprefixer@^9.7.0 svgo@^1.3.0
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y libjpeg-progs optipng \
|
&& apt-get install -y libjpeg-progs optipng \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /code/homepage
|
WORKDIR /code/homepage
|
||||||
ENV PATH /root/.local/bin:$PATH
|
ENV PATH "/root/.local/bin:$PATH"
|
||||||
|
ENV NODE_PATH="/usr/lib/node_modules"
|
||||||
RUN pip install --user -r requirements.txt
|
RUN pip install --user -r requirements.txt
|
||||||
RUN make publish
|
RUN make publish
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ http {
|
|||||||
autoindex on;
|
autoindex on;
|
||||||
root /www/data;
|
root /www/data;
|
||||||
expires $expires;
|
expires $expires;
|
||||||
|
server_name www.offen.dev staging.offen.dev;
|
||||||
add_header Content-Security-Policy $csp;
|
add_header Content-Security-Policy $csp;
|
||||||
add_header Strict-Transport-Security 'max-age=604800; includeSubDomains';
|
add_header Strict-Transport-Security 'max-age=604800; includeSubDomains';
|
||||||
add_header Referrer-Policy 'origin-when-cross-origin';
|
add_header Referrer-Policy 'origin-when-cross-origin';
|
||||||
|
@ -12,27 +12,19 @@ services:
|
|||||||
- server
|
- server
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: offen/offen@sha256:4c0d2d5db9bc749d21ad8659008658bf25318074b7c813b0a694e64816df750d
|
image: offen/offen@sha256:91845f3e0e80f7d1871f58dabd08e8614ec70f6ff37ef7e9b675d0f4f1c9ca13
|
||||||
command: serve
|
command: serve
|
||||||
volumes:
|
volumes:
|
||||||
- ./bootstrap.yml:/bootstrap.yml
|
- ./bootstrap.yml:/bootstrap.yml
|
||||||
- database:/data
|
- database:/data
|
||||||
environment:
|
environment:
|
||||||
OFFEN_APP_EVENTRETENTIONPERIOD: 4464h
|
OFFEN_APP_EVENTRETENTIONPERIOD: 4464h
|
||||||
OFFEN_APP_DEVELOPMENT: '1'
|
|
||||||
OFFEN_APP_DISABLESECURECOOKIE: '1'
|
OFFEN_APP_DISABLESECURECOOKIE: '1'
|
||||||
OFFEN_DATABASE_CONNECTIONSTRING: /data/offen.db
|
OFFEN_DATABASE_CONNECTIONSTRING: /data/offen.db
|
||||||
OFFEN_SERVER_PORT: 8080
|
OFFEN_SERVER_PORT: 8080
|
||||||
OFFEN_SERVER_REVERSEPROXY: '1'
|
OFFEN_SERVER_REVERSEPROXY: '1'
|
||||||
OFFEN_SECRETS_COOKIEEXCHANGE: 8jeKYbbnywoYIZznu4HffQ==
|
OFFEN_SECRETS_COOKIEEXCHANGE: 8jeKYbbnywoYIZznu4HffQ==
|
||||||
OFFEN_SECRETS_EMAILSALT: eypctS7SVKM1Ureb61db5Q==
|
OFFEN_SECRETS_EMAILSALT: eypctS7SVKM1Ureb61db5Q==
|
||||||
depends_on:
|
|
||||||
- server_database
|
|
||||||
|
|
||||||
server_database:
|
|
||||||
image: postgres:11.2
|
|
||||||
environment:
|
|
||||||
POSTGRES_PASSWORD: develop
|
|
||||||
|
|
||||||
homepage:
|
homepage:
|
||||||
build:
|
build:
|
||||||
|
5
homepage/postcss.config.js
Normal file
5
homepage/postcss.config.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
require('autoprefixer')
|
||||||
|
]
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
pelican==4.0.1
|
pelican==4.0.1
|
||||||
markdown==3.1.1
|
markdown==3.1.1
|
||||||
webassets==0.12.1
|
git+git://github.com/miracle2k/webassets#d1f3455e383446ca4ab0c644f326ee937e68e809
|
||||||
cssmin==0.2.0
|
cssmin==0.2.0
|
||||||
libsass==0.19.3
|
libsass==0.19.3
|
||||||
|
@ -132,9 +132,6 @@ CARDS
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-box-direction: normal;
|
|
||||||
-ms-flex-direction: column;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 280px;
|
width: 280px;
|
||||||
color: $black-mid;
|
color: $black-mid;
|
||||||
@ -154,14 +151,9 @@ CARDS
|
|||||||
@media only screen and (max-width: 960px) {
|
@media only screen and (max-width: 960px) {
|
||||||
.card-deck,
|
.card-deck,
|
||||||
.footer-card-deck {
|
.footer-card-deck {
|
||||||
-webkit-box-orient: vertical;
|
|
||||||
-webkit-box-direction: normal;
|
|
||||||
-ms-flex-direction: column;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
.card-deck {
|
.card-deck {
|
||||||
-webkit-box-pack: center;
|
|
||||||
-ms-flex-pack: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.card {
|
.card {
|
||||||
@ -178,22 +170,15 @@ CARDS
|
|||||||
@media only screen and (min-width: 961px) {
|
@media only screen and (min-width: 961px) {
|
||||||
.card-deck,
|
.card-deck,
|
||||||
.footer-card-deck {
|
.footer-card-deck {
|
||||||
-webkit-box-orient: horizontal;
|
|
||||||
-webkit-box-direction: normal;
|
|
||||||
-ms-flex-direction: row;
|
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
.card-deck {
|
.card-deck {
|
||||||
-webkit-box-pack: center;
|
|
||||||
-ms-flex-pack: center;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.card:nth-child(2) {
|
.card:nth-child(2) {
|
||||||
margin: 0 50px 0 50px;
|
margin: 0 50px 0 50px;
|
||||||
}
|
}
|
||||||
.footer-card-deck {
|
.footer-card-deck {
|
||||||
-webkit-box-pack: justify;
|
|
||||||
-ms-flex-pack: justify;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.footer-card:nth-child(1),
|
.footer-card:nth-child(1),
|
||||||
@ -379,8 +364,6 @@ BUTTONS
|
|||||||
margin: 40px 0 0 0;
|
margin: 40px 0 0 0;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
-webkit-border-radius: 0;
|
|
||||||
-moz-border-radius: 0;
|
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
padding: 8px 30px;
|
padding: 8px 30px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -13,13 +13,13 @@
|
|||||||
<meta property="og:title" content="{{ page.title }}">
|
<meta property="og:title" content="{{ page.title }}">
|
||||||
<meta property="og:description" content="{{ page.description }}">
|
<meta property="og:description" content="{{ page.description }}">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:url" content="{{ SITEURL }}/{{ page.save_as }}">
|
<meta property="og:url" content="{{ SITEURL }}{{ page.href or page.url or page.save_as }}">
|
||||||
<meta property="og:image" content="{{ SITEURL }}/theme/images/offen-logo-social-media.jpg">
|
<meta property="og:image" content="{{ SITEURL }}/theme/images/offen-logo-social-media.jpg">
|
||||||
<meta name="twitter:image:alt" content="offen logo">
|
<meta name="twitter:image:alt" content="offen logo">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<link rel="canonical" href="{{ SITEURL }}/{{ page.save_as }}">
|
<link rel="canonical" href="{{ SITEURL }}{{ page.href or page.url or page.save_as }}">
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="/theme/images/favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="/theme/images/favicon.ico">
|
||||||
{% assets filters="libsass,cssmin", output="css/style.min.css", "css/normalize.css", "css/fonts.css", "css/style.scss" %}
|
{% assets filters="libsass,postcss,cssmin", output="css/style.min.css", "css/normalize.css", "css/fonts.css", "css/style.scss" %}
|
||||||
<link rel="stylesheet" href="/{{ ASSET_URL }}">
|
<link rel="stylesheet" href="/{{ ASSET_URL }}">
|
||||||
{% endassets %}
|
{% endassets %}
|
||||||
{% if OFFEN_ACCOUNT_ID and not page.no_stats %}
|
{% if OFFEN_ACCOUNT_ID and not page.no_stats %}
|
||||||
|
Loading…
Reference in New Issue
Block a user