123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- version: '3.4'
- services:
- # mongodb:
- # image: bitnami/mongodb:latest
- # ports:
- # - "27017"
- # volumes:
- # - data:/bitnami/mongodb
- # redis:
- # image: redis:6.2-alpine
- # hostname: redis
- # container_name: redis
- # command:
- # - 'redis-server'
- # - '--requirepass myStrongPassword'
- # ports:
- # - 36379:6379
- # restart: always
- # deploy:
- # placement:
- # constraints:
- # - "node.labels.type==queue"
- # restart_policy:
- # condition: on-failure
- # delay: 5s
- # max_attempts: 3
- # window: 120s
- # update_config:
- # parallelism: 2
- # delay: 10s
- # order: stop-first
- # rollback_config:
- # parallelism: 2
- # delay: 10s
- # order: stop-first
- db:
- container_name: db
- image: postgres:12
- restart: always
- volumes:
- - app-db-data:/var/lib/postgresql/data/pgdata
- env_file:
- - .env
- networks:
- - traefik-public
- ports:
- - 5432:5432
- environment:
- - PGDATA=/var/lib/postgresql/data/pgdata
- - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
- - POSTGRES_USER=${POSTGRES_USER?Variable not set}
- - POSTGRES_DB=${POSTGRES_DB?Variable not set}
- adminer:
- container_name: db-adminer
- image: adminer
- restart: always
- networks:
- - traefik-public
- depends_on:
- - db
- environment:
- - ADMINER_DESIGN=pepa-linha-dark
- labels:
- - traefik.enable=true
- - traefik.docker.network=traefik-public
- - traefik.constraint-label=traefik-public
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.rule=Host(`adminer.${DOMAIN?Variable not set}`)
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.entrypoints=http
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.middlewares=https-redirect
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.rule=Host(`adminer.${DOMAIN?Variable not set}`)
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.entrypoints=https
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.tls=true
- - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.tls.certresolver=le
- - traefik.http.services.${STACK_NAME?Variable not set}-adminer.loadbalancer.server.port=8080
- ports:
- - 8081:8080
- # backend:
- # container_name: backend
- # image: 'jianboy/${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}'
- # build:
- # context: ./backend
- # dockerfile: ./Dockerfile
- # args:
- # INSTALL_DEV: ${INSTALL_DEV-false}
- # volumes:
- # - ./backend:/app
- # restart: always
- # # command: ["sh", "-c", "pip install debugpy -t /tmp && python /tmp/debugpy --wait-for-client --listen 0.0.0.0:5678 -m flask run --no-debugger --no-reload --host 0.0.0.0 --port 5002"]
- # networks:
- # - traefik-public
- # depends_on:
- # - db
- # ports:
- # - 8080:8080
- # env_file:
- # - .env
- # environment:
- # - DOMAIN=${DOMAIN}
- # - ENVIRONMENT=${ENVIRONMENT}
- # - BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS}
- # - SECRET_KEY=${SECRET_KEY?Variable not set}
- # - FIRST_SUPERUSER=${FIRST_SUPERUSER?Variable not set}
- # - FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD?Variable not set}
- # - USERS_OPEN_REGISTRATION=${USERS_OPEN_REGISTRATION}
- # - SMTP_HOST=${SMTP_HOST}
- # - SMTP_USER=${SMTP_USER}
- # - SMTP_PASSWORD=${SMTP_PASSWORD}
- # - EMAILS_FROM_EMAIL=${EMAILS_FROM_EMAIL}
- # - POSTGRES_SERVER=db
- # - POSTGRES_PORT=${POSTGRES_PORT}
- # - POSTGRES_DB=${POSTGRES_DB}
- # - POSTGRES_USER=${POSTGRES_USER?Variable not set}
- # - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
- # - SENTRY_DSN=${SENTRY_DSN}
- # platform: linux/amd64 # Patch for M1 Mac
- # labels:
- # - traefik.enable=true
- # - traefik.docker.network=traefik-public
- # - traefik.constraint-label=traefik-public
- # - traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=80
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`) && PathPrefix(`/api`, `/docs`, `/redoc`)
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.entrypoints=http
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`) && PathPrefix(`/api`, `/docs`, `/redoc`)
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.entrypoints=https
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.tls=true
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.tls.certresolver=le
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-www-redirect
- # - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.middlewares=${STACK_NAME?Variable not set}-www-redirect
- # frontend:
- # container_name: frontend
- # image: 'jianboy/${DOCKER_IMAGE_FRONTEND?Variable not set}:${TAG-latest}'
- # restart: always
- # networks:
- # - traefik-public
- # ports:
- # - 8082:80
- # build:
- # context: ./frontend
- # dockerfile: ./Dockerfile
- # args:
- # - VITE_API_URL=https://${DOMAIN?Variable not set}
- # - NODE_ENV=production
- # labels:
- # - traefik.enable=true
- # - traefik.docker.network=traefik-public
- # - traefik.constraint-label=traefik-public
- # - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`)
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.entrypoints=http
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.rule=Host(`${DOMAIN?Variable not set}`, `www.${DOMAIN?Variable not set}`)
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.entrypoints=https
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls=true
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls.certresolver=le
- # # Handle domain with and without "www" to redirect to only one
- # # To disable www redirection remove the next line
- # - traefik.http.middlewares.${STACK_NAME?Variable not set}-www-redirect.redirectregex.regex=^http(s)?://www.(${DOMAIN?Variable not set})/(.*)
- # # Redirect a domain with www to non-www
- # # To disable it remove the next line
- # - traefik.http.middlewares.${STACK_NAME?Variable not set}-www-redirect.redirectregex.replacement=http$${1}://${DOMAIN?Variable not set}/$${3}
- # # Middleware to redirect www, to disable it remove the next line
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.middlewares=${STACK_NAME?Variable not set}-www-redirect
- # # Middleware to redirect www, and redirect HTTP to HTTPS
- # # to disable www redirection remove the section: ${STACK_NAME?Variable not set}-www-redirect,
- # - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-www-redirect
- volumes:
- app-db-data:
- networks:
- traefik-public: # external: true
|