Files
labca/patches/docker-compose.patch

178 lines
5.3 KiB
Diff

diff --git a/docker-compose.yml b/docker-compose.yml
index 8971dbdb4..1918202dd 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,10 +1,10 @@
-version: '3'
+name: labca
services:
boulder:
# The `letsencrypt/boulder-tools:latest` tag is automatically built in local
# dev environments. In CI a specific BOULDER_TOOLS_TAG is passed, and it is
# pulled with `docker compose pull`.
- image: letsencrypt/boulder-tools:${BOULDER_TOOLS_TAG:-latest}
+ image: &boulder_image letsencrypt/boulder-tools:${BOULDER_TOOLS_TAG:-latest}
build:
context: test/boulder-tools/
# Should match one of the GO_CI_VERSIONS in test/boulder-tools/tag_and_upload.sh.
@@ -15,13 +15,15 @@ services:
# to the IP address where your ACME client's solver is listening.
# FAKE_DNS: 172.17.0.1
FAKE_DNS: 10.77.77.77
- BOULDER_CONFIG_DIR: test/config
+ BOULDER_CONFIG_DIR: labca/config
GOCACHE: /boulder/.gocache/go-build
GOFLAGS: -mod=vendor
# Forward the parent env's GOEXPERIMENT value into the container.
- GOEXPERIMENT: ${GOEXPERIMENT}
+ GOEXPERIMENT: ${GOEXPERIMENT:-}
volumes:
- - .:/boulder:cached
+ - .:/opt/boulder:cached
+ - /home/labca/boulder_labca:/opt/boulder/labca
+ - /home/labca/nginx_data/static:/opt/wwwstatic
- ./.gocache:/root/.cache/go-build:cached
- ./.hierarchy:/hierarchy/:cached
- ./.softhsm-tokens/:/var/lib/softhsm/tokens/:cached
@@ -41,20 +43,26 @@ services:
# TODO: Remove this when ServerAddress is deprecated in favor of SRV records
# and DNSAuthority.
dns: 10.55.55.10
- ports:
- - 4001:4001 # ACMEv2
- - 4002:4002 # OCSP
- - 4003:4003 # OCSP
+ expose:
+ - 4001 # ACMEv2
+ - 4002 # OCSP
+ - 4003 # OCSP
depends_on:
- bmysql
- - bproxysql
- bconsul
- - bjaeger
- entrypoint: test/entrypoint.sh
- working_dir: &boulder_working_dir /boulder
+ entrypoint: labca/entrypoint.sh
+ working_dir: &boulder_working_dir /opt/boulder
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "500k"
+ max-file: "5"
+ restart: always
bmysql:
image: mariadb:10.5
+ volumes:
+ - dbdata:/var/lib/mysql
networks:
bouldernet:
aliases:
@@ -68,22 +76,11 @@ services:
# small.
command: mysqld --bind-address=0.0.0.0 --slow-query-log --log-output=TABLE --log-queries-not-using-indexes=ON
logging:
- driver: none
- bproxysql:
- image: proxysql/proxysql:2.5.4
- # The --initial flag force resets the ProxySQL database on startup. By
- # default, ProxySQL ignores new configuration if the database already
- # exists. Without this flag, new configuration wouldn't be applied until you
- # ran `docker compose down`.
- entrypoint: proxysql -f --idle-threads -c /test/proxysql/proxysql.cnf --initial
- volumes:
- - ./test/:/test/:cached
- depends_on:
- - bmysql
- networks:
- bouldernet:
- aliases:
- - boulder-proxysql
+ driver: "json-file"
+ options:
+ max-size: "500k"
+ max-file: "5"
+ restart: always
bconsul:
image: hashicorp/consul:1.15.4
@@ -95,12 +92,73 @@ services:
bouldernet:
ipv4_address: 10.77.77.10
command: "consul agent -dev -config-format=hcl -config-file=/test/consul/config.hcl"
+ restart: always
- bjaeger:
- image: jaegertracing/all-in-one:1.50
+ gui:
+ image: *boulder_image
networks:
- bouldernet:
- ipv4_address: 10.77.77.17
+ - bouldernet
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /home/labca/admin:/go/src/labca
+ - ./.gocache:/root/.cache/go-build
+ - /home/labca/nginx_data/static:/opt/wwwstatic
+ - /home/labca/backup:/opt/backup
+ - .:/opt/boulder
+ - /home/labca/boulder_labca:/opt/boulder/labca
+ expose:
+ - 3000
+ depends_on:
+ - bmysql
+ working_dir: /go/src/labca
+ command: ./setup.sh
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "500k"
+ max-file: "5"
+ restart: always
+
+ nginx:
+ image: nginx:1.25.4
+ restart: always
+ networks:
+ - bouldernet
+ ports:
+ - 80:80
+ - 443:443
+ volumes:
+ - /home/labca/nginx_data/conf.d:/etc/nginx/conf.d
+ - /home/labca/nginx_data/ssl:/etc/nginx/ssl
+ - /home/labca/nginx_data/static:/var/www/html
+
+ control:
+ image: *boulder_image
+ networks:
+ - bouldernet
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /home/labca/admin/data:/opt/labca/data
+ - /home/labca/admin/data:/opt/labca/gui/data
+ - /home/labca/admin/bin:/opt/labca/bin
+ - /home/labca/labca:/opt/labca
+ - /home/labca/backup:/opt/backup
+ - /home/labca/control_logs:/opt/logs
+ - .:/opt/boulder
+ - /home/labca/boulder_labca:/opt/boulder/labca
+ - /home/labca/nginx_data/conf.d:/etc/nginx/conf.d
+ - /home/labca/nginx_data/ssl:/etc/nginx/ssl
+ - /home/labca/nginx_data/static:/var/www/html
+ expose:
+ - 3030
+ environment:
+ LABCA_FQDN: ${LABCA_FQDN:-notset}
+ working_dir: /opt/labca
+ command: ./control.sh
+ restart: always
+
+volumes:
+ dbdata:
networks:
# This network is primarily used for boulder services. It is also used by