42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
pg-api:
|
|
image: docker.imep.net/pg-middle-api:1.0
|
|
ports:
|
|
- 3133:3000
|
|
environment:
|
|
- DEBUG=sample-express:*
|
|
networks:
|
|
- traefik-public
|
|
deploy:
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.pg-api.rule=Host(`pg-api.dsaihost.com`)'
|
|
- 'traefik.http.routers.pg-api.middlewares=pg-api-stripprefix,pg-api-header'
|
|
- 'traefik.http.routers.pg-api.entrypoints=websecure'
|
|
- 'traefik.http.routers.pg-api.tls.certresolver=letsencryptresolver'
|
|
- 'traefik.http.services.pg-api.loadbalancer.server.port=3000'
|
|
- 'traefik.http.middlewares.pg-api-header.headers.accesscontrolallowmethods=GET,OPTIONS,PUT'
|
|
- 'traefik.http.middlewares.pg-api-header.headers.accesscontrolallowheaders=*'
|
|
- 'traefik.http.middlewares.pg-api-header.headers.accesscontrolalloworiginlist=*'
|
|
- 'traefik.http.middlewares.pg-api-header.headers.accesscontrolmaxage=100'
|
|
- 'traefik.http.middlewares.pg-api-header.headers.addvaryheader=true'
|
|
- 'traefik.http.middlewares.pg-api-header.headers.contentSecurityPolicy=default-src all dsaihost.com'
|
|
update_config:
|
|
order: start-first
|
|
failure_action: rollback
|
|
delay: 10s
|
|
rollback_config:
|
|
parallelism: 0
|
|
order: stop-first
|
|
restart_policy:
|
|
condition: any
|
|
delay: 5s
|
|
max_attempts: 3
|
|
window: 120s
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|