version: '{{ compose_version }}' services: site: image: rycus86/podlike command: -logs -ipc=false networks: ['{{ ingress_network }}'] deploy: mode: replicated replicas: 1 update_config: parallelism: 1 order: start-first labels: - traefik.enable=true - traefik.http.routers.{{ service }}.rule=Host(`{{ service }}.{{ main_domain }}`) - traefik.http.routers.{{ service }}.priority=100 - traefik.http.routers.{{ service }}.tls=true - traefik.http.routers.{{ service }}.tls.certresolver=lets-encrypt - traefik.http.services.{{ service }}.loadbalancer.server.port=80 restart_policy: condition: any max_attempts: 3 labels: pod.component.fpm: | image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} volumes: - www-data:/var/www pod.component.nginx: | image: nginx:latest volumes: - www-data:/var/www - nginx-config:/etc/nginx/templates pod.copy.fpm: /var/conf/wipe/.env:/var/www/.env pod.init.components: | - image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} entrypoint: ["/bin/sh", "-c"] command: ["cp -r /var/www/* /mnt/www"] volumes: - www-data:/mnt/www - image: registry.kadet.net/wipe/php-fpm:{{ wipe_version }} entrypoint: ["/bin/sh", "-c"] command: ["cp -r /var/www/nginx/* /mnt/config"] volumes: - nginx-config:/mnt/config configs: - source: dotenv_{{ dotenv_file.checksum }} target: /var/conf/wipe/.env volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - nginx-config:/mnt/nginx-config - www-data:/mnt/www-data configs: dotenv_{{ dotenv_file.checksum }}: file: ./config/.env volumes: nginx-config: name: {{'nginx-config.{{.Task.ID}}'}} labels: com.github.rycus86.podlike.volume-ref: nginx-config www-data: name: {{'www-data.{{.Task.ID}}'}} labels: com.github.rycus86.podlike.volume-ref: www-data