Update: Create build script
This commit is contained in:
parent
982be676d5
commit
16576bf561
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.env
|
||||
inc/public
|
||||
inc/resources
|
||||
inc/.hugo_build.lock
|
||||
|
14
build.sh
Executable file
14
build.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
source .env
|
||||
|
||||
[ -z $PUBLIC_URL ] && PUBLIC_URL="https://example.com"
|
||||
|
||||
echo "Bulding public site: "$PUBLIC_URL
|
||||
|
||||
cd inc
|
||||
git submodule update --init
|
||||
|
||||
cd ..
|
||||
docker-compose build
|
||||
docker-compose run hugo build -b $PUBLIC_URL
|
@ -4,10 +4,10 @@ services:
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
- HUGO_HOST=docker
|
||||
- HUGO_PORT=1313
|
||||
- HUGO_HOST=${HUGO_HOST}
|
||||
- HUGO_PORT=${HUGO_PORT}
|
||||
ports:
|
||||
- 1313:1313
|
||||
user: 1000:1000
|
||||
- ${HUGO_PORT}:1313
|
||||
user: ${USER_GROUP}
|
||||
volumes:
|
||||
- ./inc:/app
|
||||
|
4
env.sample
Normal file
4
env.sample
Normal file
@ -0,0 +1,4 @@
|
||||
PUBLIC_URL=http://example.com
|
||||
HUGO_HOST=docker
|
||||
HUGO_PORT=1313
|
||||
USER_GROUP=1000:1000
|
Loading…
Reference in New Issue
Block a user