docker-compose #351
leglands
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bonjour à tous,
J'ai écrit un docker compose pour macos. Si ca peut aider, être enrichi ou validé :)
J'ai descendu les 2 gits front et backend dans un répertoire Ara
Un postgres et un s3 local.
J'ai du modifier 2 fichiers :
1- Ara/confiture-rest-api/src/audits/file-storage.service.ts
constructor(private readonly config: ConfigService) { this.s3Client = new S3Client({ region: 'eu-west-1', endpoint: 'http://locals3:4566', credentials: { accessKeyId: 'testkey', secretAccessKey: 'testsecret', }, forcePathStyle: true, // <== ici ( https://qubyte.codes/blog/tip-connecting-to-localstack-s3-using-the-javascript-aws-sdk-v3 ) }); }
2- Ara/confiture-web-app/vite.config.ts
server: { host: true, // <== ici : FOR DOCKER ( https://stackoverflow.com/questions/70012970/running-a-vite-dev-server-inside-a-docker-container ) proxy: { "/api": "http://backend:4000", // SLE : FOR DOCKER => en faire une var ENV }, port: 3000, },
à lancer avec = docker-compose up --force-recreate -d
`version: '3.8'
services:
db:
image: postgres:latest
container_name: db
volumes:
- $PWD/db_data:/var/lib/postgresql/data:delegated
expose:
- 5432
ports:
- '5432:5432'
networks:
- app-network
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=confiture-db
networks:
app-network:
driver: bridge
`
Beta Was this translation helpful? Give feedback.
All reactions