Browse Source

Plan b, upload to aws in preparation.

pull/141/head
Jonas Oberg 1 year ago
parent
commit
3f7bb3c7ba
3 changed files with 11 additions and 1 deletions
  1. 3
    1
      Dockerfile
  2. 1
    0
      playbook.yml
  3. 7
    0
      site/build/build.sh

+ 3
- 1
Dockerfile View File

@@ -4,7 +4,9 @@ ENV HUGO_VERSION 0.20.7
4 4
 ENV HUGO_BINARY hugo_${HUGO_VERSION}_Linux-64bit.deb
5 5
 
6 6
 RUN apt-get update && apt-get upgrade -y && \
7
-    apt-get install -y git curl unzip python3
7
+    apt-get install -y git curl unzip python3 python3-pip libyaml-dev
8
+
9
+RUN pip3 install awscli
8 10
 
9 11
 RUN curl -sS https://getcomposer.org/installer \
10 12
     | php -- --install-dir=/usr/local/bin --filename=composer

+ 1
- 0
playbook.yml View File

@@ -19,4 +19,5 @@
19 19
           LETSENCRYPT_EMAIL: jonas@fsfe.org
20 20
         volumes:
21 21
           - "/srv/forms/pmpc:/usr/share/blog/data/signatures:ro"
22
+          - "/srv/pmpc-cred:/srv/cred:ro"
22 23
 

+ 7
- 0
site/build/build.sh View File

@@ -18,4 +18,11 @@ if [ "$mode" == "server" ]; then
18 18
   hugo server
19 19
 else
20 20
   hugo
21
+
22
+  #
23
+  # After building the website, we set the AWS credentials and uploda
24
+  # everything to our AWS s3 bucket.
25
+  #
26
+  . /srv/cred/aws.sh
27
+  /usr/local/bin/aws s3 cp /usr/share/blog/public/ s3://aws-website-pmpc-soegm/ --recursive
21 28
 fi

Loading…
Cancel
Save