-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy pathdocker-compose.yaml
58 lines (49 loc) · 1.49 KB
/
docker-compose.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2022 Apple Inc. and the Swift.org project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See LICENSE.txt for license information
# See CONTRIBUTORS.txt for the list of Swift.org project authors
#
# SPDX-License-Identifier: Apache-2.0
# usage:
# docker-compose run build
#
# docker-compose up website
#
version: "2"
services:
docker-setup:
image: swift-website-builder
build:
context: .
dockerfile: Dockerfile
common: &common
image: swift-website-builder
depends_on: [docker-setup]
volumes:
- .:/srv/jekyll:cached
- ./.output:/output:z
build:
<<: *common
command: /bin/bash -cl "
bundle check
&& bundle exec jekyll doctor --source /srv/jekyll --destination /output
&& bundle exec jekyll build --source /srv/jekyll --destination /output"
test:
<<: *common
command: /bin/bash -cl "
bundle check
&& bundle exec jekyll doctor --source /srv/jekyll --destination /output
&& bundle exec jekyll build --source /srv/jekyll --destination /output"
website:
<<: *common
command: /bin/bash -cl "bundle check && bundle exec jekyll serve --source /srv/jekyll --destination /output --host 0.0.0.0 --watch"
ports:
- "4000:4000"
soundness:
<<: *common
command: /bin/bash -cl "/code/scripts/soundness.sh"
volumes:
- .:/code:z