Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
44 lines (43 loc) · 1.65 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
44 lines (43 loc) · 1.65 KB
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
# Base stack: builds the docs site and serves it with nginx.
#
# This file on its own runs anywhere, including a laptop with no Traefik:
#
# docker compose up -d --build # then http://localhost:9351
#
# It builds the same image that gets deployed, so it is the way to check a
# change locally before it goes to the server.
#
# Deploying behind Traefik layers the second file on top, which adds the
# router labels and the external network:
#
# docker compose -f docker-compose.yaml -f docker-compose.prod.yaml up -d --build
#
# Only values that differ per host live in `.env`, the same file the Astro
# build reads. Everything that is the same for anyone who clones this repo is
# written here directly. See `.env.example`.
services:
web:
build:
context: .
args:
# Only needed when the build host reaches the internet through a
# proxy. Empty otherwise, which is the common case.
HTTP_PROXY: ${HTTP_PROXY:-}
HTTPS_PROXY: ${HTTPS_PROXY:-}
NO_PROXY: ${NO_PROXY:-}
image: morphicblocks-docs-i
container_name: morphicblocks-docs-c
restart: unless-stopped
# Loopback only: for reaching the container from the host itself, locally
# or when debugging on the server. Public traffic arrives through Traefik
# instead, over the Docker network. The landing and playground stacks use
# 9350 and 9352 so all three can run side by side.
ports:
- "127.0.0.1:9351:80"
# Serving static files needs very little; the cap is here to keep one
# container from starving the others on a shared host.
deploy:
resources:
limits:
cpus: "0.50"
memory: 256M