Added restart env

master
Meliurwen 4 years ago
parent a499eeb00f
commit b10ce52cb9
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 2
      .env.example
  2. 6
      docker-compose.yml

@ -15,6 +15,7 @@ DB_PASSWD=passwordhere
GT_IMG= GT_IMG=
GT_TAG= GT_TAG=
GT_CONTAINER_NAME= GT_CONTAINER_NAME=
GT_RESTART=
# Database # Database
# If using PostgreSQL is better to use SIGTERM to power off the container which # If using PostgreSQL is better to use SIGTERM to power off the container which
@ -26,5 +27,6 @@ GT_CONTAINER_NAME=
DB_IMG= DB_IMG=
DB_TAG= DB_TAG=
DB_CONTAINER_NAME= DB_CONTAINER_NAME=
GT_RESTART=
DB_STOP_SIG= DB_STOP_SIG=
DB_STOP_GRC=30s DB_STOP_GRC=30s

@ -3,8 +3,8 @@ version: "3.1"
services: services:
server: server:
image: ${GT_IMG:-gitea/gitea}:${GT_TAG:-latest} image: ${GT_IMG:-gitea/gitea}:${GT_TAG:-latest}
container_name: ${GT_CONTAINER_NAME} container_name: ${GT_CONTAINER_NAME:gitea}
restart: unless-stopped restart: ${GT_RESTART:-unless-stopped}
networks: networks:
- default - default
- gitea - gitea
@ -30,7 +30,7 @@ services:
db: db:
image: ${DB_IMG:-postgres}:${DB_TAG:-12.4} image: ${DB_IMG:-postgres}:${DB_TAG:-12.4}
container_name: ${DB_CONTAINER_NAME:-gitea-db} container_name: ${DB_CONTAINER_NAME:-gitea-db}
restart: unless-stopped restart: ${DB_RESTART:-unless-stopped}
stop_signal: ${DB_STOP_SIG:-SIGTERM} stop_signal: ${DB_STOP_SIG:-SIGTERM}
stop_grace_period: ${DB_STOP_GRC:-10s} stop_grace_period: ${DB_STOP_GRC:-10s}
environment: environment:

Loading…
Cancel
Save