blob: c377e93fe9375854725b8db2766ed34c74a4796f [file] [log] [blame]
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
services:
hugo_publish_apache:
profiles:
- publish
build:
context: .
user: $UID_GID
volumes:
- workspace:/polaris
- resources:/polaris/site/resources
- hugo_cache:/hugo/cache
command:
- create-site-publication
hugo_publish_localhost8080:
profiles:
- publish
build:
context: .
ports:
- "8080:8080"
user: $UID_GID
volumes:
- workspace:/polaris
- resources:/polaris/site/resources
- hugo_cache:/hugo/cache
command:
- create-local-site-publication
- --baseURL
- http://localhost:8080/
volumes:
workspace:
# This is the polaris source tree
driver: local
driver_opts:
# set UID+GID so podman doesn't "chown" the Polaris workspace to an ephemeral UID (Linux only)
o: $MOUNT_OPTS_WORKSPACE
type: none
device: $WORKSPACE
hugo_cache:
# 'hugo_cache' is the Go modules cache - just keep it across restarts
driver: local
driver_opts:
# set UID+GID so podman doesn't "chown" the Polaris workspace to an ephemeral UID (Linux only)
o: $MOUNT_OPTS_WORKSPACE
type: none
device: $WORKSPACE/site/build/hugo-cache
resources:
# mount for the generated `resources/_gen` dir (no way to move that elsewhere :( )
driver: local
driver_opts:
type: tmpfs
device: tmpfs
o: $MOUNT_OPTS_RESOURCES