mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
5275fc78f2
Added: - Test PSU with Portainer CE 2.0.1 API - Test PSU with Portainer CE 2.1.1 API Changed: - Use Docker Compose 1.28.3 instead of Docker Compose 1.26.2 - Use Traefik 2.4 instead of Traefik 2.2 for testing - Upgrade operating system of Docker based images, with Alpine 3.13 Removed: - Test PSU with Portainer 1.22.2 API - Test PSU with Portainer 1.23.2 API
73 lines
2.0 KiB
YAML
73 lines
2.0 KiB
YAML
version: '3.7'
|
|
|
|
services:
|
|
job:
|
|
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub/testing/psu-php-app:latest
|
|
labels:
|
|
job-name: job-web-app
|
|
entrypoint: ["php"]
|
|
command: -r 'echo date("d-m-Y H:i:s").PHP_EOL;'
|
|
# command: -r 'sleep(20); echo date("d-m-Y H:i:s").PHP_EOL;'
|
|
environment:
|
|
- HTTP_PROXY
|
|
- HTTPS_PROXY
|
|
- http_proxy
|
|
- https_proxy
|
|
- NO_PROXY
|
|
deploy:
|
|
restart_policy:
|
|
condition: none
|
|
|
|
app:
|
|
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub/testing/psu-php-app:latest
|
|
environment:
|
|
- HTTP_PROXY
|
|
- HTTPS_PROXY
|
|
- http_proxy
|
|
- https_proxy
|
|
- NO_PROXY
|
|
volumes:
|
|
- psu-php-runner:/var/run/php
|
|
deploy:
|
|
update_config:
|
|
order: start-first
|
|
failure_action: continue
|
|
|
|
web:
|
|
image: $CI_REGISTRY/$CI_PROJECT_NAMESPACE/hub/testing/psu-apache2:latest
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.docker.network=psu-traefik-net
|
|
# HTTPS route
|
|
- "traefik.http.routers.web-php-app.entrypoints=https"
|
|
- "traefik.http.routers.web-php-app.rule=Host(`$PSU_STACK_NAME.$BASE_DOMAIN`)"
|
|
- "traefik.http.routers.web-php-app.tls=true"
|
|
# IMPORTANT: The `retry.attempts` middleware is required to allow zero (1s) downtime deployment
|
|
- traefik.http.middlewares.retry-if-fails.retry.attempts=10
|
|
- traefik.http.middlewares.https-only.redirectscheme.scheme=https
|
|
- traefik.http.middlewares.secured.chain.middlewares=retry-if-fails,https-only
|
|
- traefik.http.routers.web-php-app.middlewares=secured
|
|
# Service
|
|
- traefik.http.services.web-php-app.loadbalancer.server.port=5000
|
|
environment:
|
|
- HTTP_PROXY
|
|
- HTTPS_PROXY
|
|
- http_proxy
|
|
- https_proxy
|
|
- NO_PROXY
|
|
volumes:
|
|
- psu-php-runner:/var/run/php
|
|
deploy:
|
|
update_config:
|
|
failure_action: rollback
|
|
order: start-first
|
|
networks:
|
|
- psu-traefik-net
|
|
|
|
networks:
|
|
psu-traefik-net:
|
|
external: true
|
|
|
|
volumes:
|
|
psu-php-runner:
|