feat(docker): add dev config and update prod image source

Introduce docker-compose-example-dev.yml for development environment, enabling local builds with stricter container settings (e.g., no-new-privileges, read-only).

Update docker-compose-example.yml to pull the latest version of the structables image from the registry instead of building it locally.

Ensures consistent deployment in production and better resource management during development.
This commit is contained in:
Kumi 2024-07-01 15:13:34 +02:00
parent 7d81a65b2a
commit f576555005
Signed by: kumi
GPG key ID: ECBCC9082395383F
2 changed files with 20 additions and 2 deletions

View file

@ -0,0 +1,18 @@
services:
structables:
container_name: structables
restart: unless-stopped
build: .
ports:
- "127.0.0.1:8002:8002"
env_file: .env
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
read_only: true
deploy:
resources:
limits:
cpus: '0.5'
memory: 300M

View file

@ -2,7 +2,7 @@ services:
structables: structables:
container_name: structables container_name: structables
restart: unless-stopped restart: unless-stopped
build: . image: privatecoffee/structables:latest
ports: ports:
- "127.0.0.1:8002:8002" - "127.0.0.1:8002:8002"
env_file: .env env_file: .env