Skip to content

Commit

Permalink
add: add https-portal container
Browse files Browse the repository at this point in the history
  • Loading branch information
crab85193 committed Dec 20, 2023
1 parent 49c3277 commit 589a5e6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
.venv/

static/*
!static/.gitkeep
!static/.gitkeep

containers/https-portal/ssl_certs/
1 change: 1 addition & 0 deletions containers/https-portal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM steveltn/https-portal:1
File renamed without changes.
10 changes: 5 additions & 5 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
version: "3.9"

services:
python:
container_name: python
store-manager:
container_name: store-manager
build:
context: .
dockerfile: containers/python/Dockerfile
dockerfile: containers/store-manager/Dockerfile
volumes:
- .:/code
tty: true
env_file:
- .env.dev
networks:
- shared_network
image_web:
container_name: image_web
image-web:
container_name: image-web
build:
context: .
dockerfile: containers/nginx/Dockerfile
Expand Down
25 changes: 20 additions & 5 deletions docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
version: "3.9"

services:
python:
container_name: python
store-manager:
container_name: store-manager
build:
context: .
dockerfile: containers/python/Dockerfile
dockerfile: containers/store-manager/Dockerfile
restart: unless-stopped
volumes:
- .:/code
tty: true
env_file:
- .env.prod
image_web:
container_name: image_web
image-web:
container_name: image-web
build:
context: .
dockerfile: containers/nginx/Dockerfile
Expand All @@ -22,5 +22,20 @@ services:
- ./static:/static
ports:
- 80:80
ssl-web:
container_name: ssl-web
build:
context: .
dockerfile: containers/https-portal/Dockerfile
restart: unless-stopped
ports:
- 80:80
- 443:443
environment:
DOMAINS: 'tely-store.st.ie.u-ryukyu.ac.jp -> http://web:80'
STAGE: 'production'
#FORCE_RENEW: 'true'
volumes:
- ./containers/https-portal/ssl_certs:/var/lib/https-portal
volumes:
static:
6 changes: 3 additions & 3 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

CURRENT_DIR=`cd $(dirname $0) && pwd`

container_id=`docker ps -q -f status=running -f name=python`
container_id=`docker ps -q -f status=running -f name=store-manager`

if [ -z "$container_id" ]; then
echo "python is not running"
echo "store-manager is not running"
exit 0
fi

docker exec -it python python src/main.py
docker exec -it store-manager python src/main.py

docker-compose -f docker-compose.prod.yml down

Expand Down

0 comments on commit 589a5e6

Please sign in to comment.