Skip to content

Commit

Permalink
update Dockerfile ref
Browse files Browse the repository at this point in the history
  • Loading branch information
AmelieLoulergue committed Nov 20, 2024
1 parent de3bc86 commit 5f72de1
Show file tree
Hide file tree
Showing 2 changed files with 169 additions and 2 deletions.
167 changes: 167 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
x-environment-variables:
&default-environment
API_PREFIX: "/palpatine"
DELEGATED_STORAGE_RATE_LIMIT: 5
DELEGATED_STORAGE_RATE_LIMIT_WINDOW: 30000
THUMBOR_SERVICE: http://localhost:8888
NGINX_SERVICE: http://host.docker.internal:8080
IMAGE_SERVICE: http://localhost:3001
NGINX_INGRESS: http://localhost:8080

VERSION: 0.0.1
NAMESPACES: CMS,FORMS,DEV
VALID_MIMETYPES: image/png,image/jpeg,application/pdf,image/jpg,image/webp,image/svg+xml

DEV_ENV: true

# GLOUTON API:
# DELEGATED_STORAGE_HOST: http://host.docker.internal:3002
# DELEGATED_STORAGE_READINESS_CHECK: /readiness-check
# DELEGATED_STORAGE_GET_PATH:
# DELEGATED_STORAGE_POST_PATH:
# DELEGATED_STORAGE_PUT_PATH:
# DELEGATED_STORAGE_DELETE_PATH:
# DELEGATED_STORAGE_TOKEN: NinjaDesIles

# S3 BACKUP :
DELEGATED_STORAGE_READINESS_CHECK: /minio/health/live
DELEGATED_STORAGE_HOST: http://localhost:9000

DELEGATED_STORAGE_METHOD: S3

S3_ENDPOINT: localhost
S3_PORT: 9000
S3_ACCESS_KEY: minioadmin
S3_SECRET_KEY: minioadmin
S3_BUCKET_NAME: media

DUMP_FOLDER_PATH: /dumps
REDIS_SERVICE: localhost

HEALTHCHECK_ROUTE: /readiness-check

PAYLOAD_MAX_SIZE: "10mb"
BASE_TIMEOUT_MS: 1000

ORIGINS_ALLOWED: localhost,*
METHODS_ALLOWED: GET,POST

USE_STRIPMETADATA: true
TMP_FILES_PATH: './images'


services:
redis:
image: bitnami/redis:7.0.15-debian-12-r20
container_name: redis_server
command: redis-server --protected-mode no --dir /dumps
ports:
- '6379:6379'
volumes:
- ./local/redis/dumps:/dumps
networks:
- redis_net
redisinsight:
image: redis/redisinsight:latest
container_name: redisinsight
ports:
- '5540:5540'
networks:
- redis_net
depends_on:
- redis

minio:
image: minio/minio
ports:
- 9000:9000
- 8900:8900
environment:
MINIO_ROOT_USER: 'minioadmin'
MINIO_ROOT_PASSWORD: 'minioadmin'
command: 'minio server /data/minio --console-address ":8900"'
volumes:
- pv-minio:/data/minio
networks:
- media_network

images-provider:
build:
context: src/api
dockerfile: Dockerfile.dev
ports:
- 3001:3001
networks:
- media_network
- redis_net
volumes:
- ./local/redis/dumps:/dumps
- ./local/logs:/logs
environment:
<<: *default-environment
THUMBOR_SERVICE: http://thumbor:8888
NGINX_SERVICE: http://nginx:8080
IMAGE_SERVICE: http://images-provider:3001
NGINX_INGRESS: http://localhost:8080
DELEGATED_STORAGE_HOST: http://minio:9000
REDIS_SERVICE: redis
S3_ENDPOINT: minio
healthcheck:
test: ["CMD-SHELL", "wget --spider --quiet http://images-provider:3001$$API_PREFIX/readiness-check || exit 1"]
interval: 10s
timeout: 7s
retries: 5
nginx-purge:
image: emcniece/nginx-cache-purge:1.13-alpine
ports:
- 8081:8081
volumes:
- ./local/nginx/nginx-purge.conf:/etc/nginx/nginx.conf
networks:
- media_network
depends_on:
- images-provider
nginx:
image: bitnami/nginx:latest
ports:
- 8080:8080
volumes:
- ./local/nginx/nginx.conf:/opt/bitnami/nginx/conf/nginx.conf
networks:
- media_network
depends_on:
- images-provider
job:
build:
context: src/
dockerfile: Dockerfile.dev
ports:
- 3006:3006
networks:
- media_network
volumes:
- ./local/logs:/logs
depends_on:
images-provider:
condition: service_healthy
environment:
<<: *default-environment
IMAGE_SERVICE: http://images-provider:3001
API_SERVICE: http://images-provider:3001
API_PREFIX: /palpatine
DEV_ENV: true
CATALOG_ROUTE: '/catalog'
GET_ROUTE: '/assets/media/'

volumes:
pv-minio:
minio:
driver: local
caddy_data:
caddy_config:

networks:
redis_net:
driver: bridge
media_network:
driver: bridge
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ services:
images-provider:
build:
context: src/api
dockerfile: Dockerfile.dev
dockerfile: Dockerfile
ports:
- 3001:3001
networks:
Expand Down Expand Up @@ -134,7 +134,7 @@ services:
job:
build:
context: src/
dockerfile: Dockerfile.dev
dockerfile: Dockerfile
ports:
- 3006:3006
networks:
Expand Down

0 comments on commit 5f72de1

Please sign in to comment.