Files
labca/patches/docker-compose.patch
2025-08-05 19:35:09 +02:00

247 lines
7.5 KiB
Diff

diff --git a/docker-compose.yml b/docker-compose.yml
index 8092b1522..b9a8ac069 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,3 +1,4 @@
+name: labca
services:
boulder:
# The `letsencrypt/boulder-tools:latest` tag is automatically built in local
@@ -14,13 +15,15 @@ services:
# to the IP address where your ACME client's solver is listening. This is
# pointing at the boulder service's "public" IP, where challtestsrv is.
FAKE_DNS: 64.112.117.122
- BOULDER_CONFIG_DIR: test/config
+ BOULDER_CONFIG_DIR: labca/config
GOCACHE: /boulder/.gocache/go-build
GOFLAGS: -mod=vendor
volumes:
- - .:/boulder:cached
+ - .:/opt/boulder:cached
+ - /home/labca/boulder_labca:/opt/boulder/labca
+ - /home/labca/nginx_data/static:/var/www/html
- ./.gocache:/root/.cache/go-build:cached
- - ./test/certs/.softhsm-tokens/:/var/lib/softhsm/tokens/:cached
+ - /home/labca/boulder_labca/certs/.softhsm-tokens/:/var/lib/softhsm/tokens/
networks:
bouldernet:
ipv4_address: 10.77.77.77
@@ -53,122 +56,136 @@ services:
- 4003:4003 # SFE
depends_on:
- bmysql
- - bproxysql
- - bredis_1
- - bredis_2
- - bredis_3
- - bredis_4
+ - bredis
- bconsul
- - bjaeger
- bpkimetal
- entrypoint: test/entrypoint.sh
- working_dir: &boulder_working_dir /boulder
-
- bsetup:
- image: *boulder_tools_image
- volumes:
- - .:/boulder:cached
- - ./.gocache:/root/.cache/go-build:cached
- - ./test/certs/.softhsm-tokens/:/var/lib/softhsm/tokens/:cached
- entrypoint: test/certs/generate.sh
- working_dir: *boulder_working_dir
- profiles:
- # Adding a profile to this container means that it won't be started by a
- # normal "docker compose up/run boulder", only when specifically invoked
- # with a "docker compose up bsetup".
- - setup
+ - control
+ 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.11.13
+ volumes:
+ - dbdata:/var/lib/mysql
networks:
bouldernet:
aliases:
- boulder-mysql
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
- # Send slow queries to a table so we can check for them in the
- # integration tests. For now we ignore queries not using indexes,
- # because that seems to trigger based on the optimizer's choice to not
- # use an index for certain queries, particularly when tables are still
- # small.
- command: mysqld --bind-address=0.0.0.0 --slow-query-log --log-output=TABLE --log-queries-not-using-indexes=ON
+ command: mysqld --bind-address=0.0.0.0 --log-output=TABLE
logging:
- driver: none
+ driver: "json-file"
+ options:
+ max-size: "500k"
+ max-file: "5"
+ restart: always
- 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
-
- bredis_1:
+ bredis:
image: redis:6.2.7
volumes:
- ./test/:/test/:cached
- command: redis-server /test/redis-ocsp.config
+ - /home/labca/boulder_labca:/opt/boulder/labca
+ command: redis-server /opt/boulder/labca/redis-ratelimits.config
networks:
bouldernet:
- # TODO(#8215): Remove this static IP allocation (and similar below) when
- # we tear down ocsp-responder. We only have it because ocsp-responder
- # requires IPs in its "ShardAddrs" config, while ratelimit redis
- # supports looking up shards via hostname and SRV record.
- ipv4_address: 10.77.77.2
+ ipv4_address: 10.77.77.4
+ restart: always
- bredis_2:
- image: redis:6.2.7
+ bconsul:
+ image: hashicorp/consul:1.15.4
+ depends_on:
+ - control
volumes:
- - ./test/:/test/:cached
- command: redis-server /test/redis-ocsp.config
+ - /home/labca/boulder_labca:/opt/boulder/labca
networks:
bouldernet:
- ipv4_address: 10.77.77.3
+ ipv4_address: 10.77.77.10
+ command: "consul agent -dev -config-format=hcl -config-file=/opt/boulder/labca/consul/config.hcl"
+ restart: always
- bredis_3:
- image: redis:6.2.7
- volumes:
- - ./test/:/test/:cached
- command: redis-server /test/redis-ratelimits.config
+ gui:
+ image: *boulder_tools_image
networks:
- bouldernet:
- ipv4_address: 10.77.77.4
-
- bredis_4:
- image: redis:6.2.7
+ - bouldernet
volumes:
- - ./test/:/test/:cached
- command: redis-server /test/redis-ratelimits.config
- networks:
- bouldernet:
- ipv4_address: 10.77.77.5
+ - /var/run/docker.sock:/var/run/docker.sock
+ - /home/labca/admin:/go/src/labca
+ - ./.gocache:/root/.cache/go-build
+ - /home/labca/nginx_data/static:/var/www/html
+ - /home/labca/backup:/opt/backup
+ - .:/opt/boulder
+ - /home/labca/boulder_labca:/opt/boulder/labca
+ - /home/labca/boulder_labca/certs/.softhsm-tokens/:/var/lib/softhsm/tokens/
+ expose:
+ - 3000
+ depends_on:
+ - bmysql
+ - control
+ working_dir: /go/src/labca
+ command: ./setup.sh
+ logging:
+ driver: "json-file"
+ options:
+ max-size: "500k"
+ max-file: "5"
+ restart: always
- bconsul:
- image: hashicorp/consul:1.15.4
- volumes:
- - ./test/:/test/:cached
+ nginx:
+ image: nginx:latest
+ restart: always
networks:
- bouldernet:
- ipv4_address: 10.77.77.10
- command: "consul agent -dev -config-format=hcl -config-file=/test/consul/config.hcl"
+ - 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
+ depends_on:
+ - control
- bjaeger:
- image: jaegertracing/all-in-one:1.50
+ control:
+ image: *boulder_tools_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/boulder_labca/certs/.softhsm-tokens/:/var/lib/softhsm/tokens/
+ - /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
bpkimetal:
image: ghcr.io/pkimetal/pkimetal:v1.20.0
networks:
- bouldernet
+ restart: always
+
+volumes:
+ dbdata:
networks:
# This network represents the data-center internal network. It is used for