Compare commits
2
Commits
68af50b20e
...
36bd130a28
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36bd130a28 | ||
|
|
4f1c41921d |
@@ -81,16 +81,7 @@ jobs:
|
||||
docker stop devops-platform
|
||||
docker rm devops-platform
|
||||
|
||||
if docker run -d \
|
||||
--name devops-platform \
|
||||
--restart unless-stopped \
|
||||
--read-only \
|
||||
--cap-drop=ALL \
|
||||
--security-opt=no-new-privileges:true \
|
||||
--memory=256m \
|
||||
--cpus=0.5 \
|
||||
-p 127.0.0.1:8000:8000 \
|
||||
"$IMAGE"; then
|
||||
if IMAGE="$IMAGE" docker compose up -d --no-build app; then
|
||||
echo "New container started"
|
||||
else
|
||||
echo "Failed to start new container; restoring old image"
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
app:
|
||||
image: ${IMAGE:-mikhaillobanov/devops-platform:latest}
|
||||
container_name: devops-platform
|
||||
restart: unless-stopped
|
||||
|
||||
ports:
|
||||
- "127.0.0.1:8000:8000"
|
||||
|
||||
read_only: true
|
||||
cap_drop:
|
||||
- ALL
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
mem_limit: 256m
|
||||
cpus: 0.5
|
||||
Reference in New Issue
Block a user