From 038cc1228c4b982ce32721171c446f598e87431d Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Sat, 18 May 2024 14:09:49 -0300 Subject: [PATCH] =?UTF-8?q?Make=20local=20development=20setup=20work=20?= =?UTF-8?q?=F0=9F=8E=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes autonomic-cooperative/astro-payload-template#1 --- .env | 5 ++--- docker-compose.yml | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.env b/.env index 87ef9a0..9ce9810 100644 --- a/.env +++ b/.env @@ -4,8 +4,7 @@ PAYLOAD_HOST=payload:3001 PAYLOAD_URL=http://localhost:3001 PAYLOAD_PORT=3001 PAYLOAD_SECRET=supersecretkey -MONGODB_URI=mongodb://payload:test@mongo:27017 MONGODB_USER=payload -MONGODB_PW=test +MONGODB_PASSWORD=password TOKEN=supersecrettoken -REPOSITORY=mooxl/astroad \ No newline at end of file +REPOSITORY=mooxl/astroad diff --git a/docker-compose.yml b/docker-compose.yml index a96e952..b03a375 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,11 @@ services: astro: container_name: ${NAME}-astro + image: git.autonomic.zone/autonomic-cooperative/astro-payload-test-astro:latest restart: unless-stopped build: context: astro - target: de + command: ["yarn", "dev"] networks: - front volumes: @@ -16,6 +17,7 @@ services: - payload payload: + image: git.autonomic.zone/autonomic-cooperative/astro-payload-test-payload:latest container_name: ${NAME}-payload restart: unless-stopped build: @@ -25,7 +27,10 @@ services: PAYLOAD_URL: ${PAYLOAD_URL} PAYLOAD_PORT: ${PAYLOAD_PORT} PAYLOAD_SECRET: ${PAYLOAD_SECRET} - MONGODB_URI: ${MONGODB_URI} + MONGODB_USER: + MONGODB_HOST: mongo + MONGODB_PASSWORD: + MONGODB_PORT: 27017 TOKEN: ${TOKEN} volumes: - ./payload/src:/base/src @@ -43,12 +48,12 @@ services: image: mongo:6.0.5 restart: unless-stopped volumes: - - ./data/mongo:/data/db + - mongo:/data/db command: - --storageEngine=wiredTiger environment: MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USER} - MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PW} + MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD} networks: - back ports: @@ -57,3 +62,6 @@ services: networks: front: back: + +volumes: + mongo: