Make local development setup work 🎊
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

Closes autonomic-cooperative/astro-payload-template#1
This commit is contained in:
3wc 2024-05-18 14:09:49 -03:00
parent f5171cc519
commit 038cc1228c
2 changed files with 14 additions and 7 deletions

5
.env
View File

@ -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
REPOSITORY=mooxl/astroad

View File

@ -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: