Compare commits

...

2 Commits

Author SHA1 Message Date
3wc
8a329feb3e Tidy up environment variables for local dev
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-18 14:38:21 -03:00
3wc
ff1126df49 Don't try and drone rebuild in development
Closes autonomic-cooperative/astro-payload-template#17
2024-05-18 14:37:51 -03:00
2 changed files with 18 additions and 8 deletions

15
.env
View File

@ -1,10 +1,13 @@
# This file is just for local dev; see <somewhere else> for live deployment
NAME=astroad NAME=astroad
ASTRO_HOST=localhost:3000
PAYLOAD_HOST=payload:3001 PAYLOAD_URL=http://localhost:3003
PAYLOAD_URL=http://localhost:3001 PAYLOAD_PORT=3003
PAYLOAD_PORT=3001
##############################################################################
# Infinite nerd depth settings, you probably don't need to change these #
##############################################################################
PAYLOAD_SECRET=supersecretkey PAYLOAD_SECRET=supersecretkey
MONGODB_USER=payload MONGODB_USER=payload
MONGODB_PASSWORD=password MONGODB_PASSWORD=password
TOKEN=supersecrettoken
REPOSITORY=mooxl/astroad

View File

@ -6,6 +6,8 @@ services:
build: build:
context: astro context: astro
command: ["yarn", "dev"] command: ["yarn", "dev"]
environment:
DEV: 1
networks: networks:
- front - front
volumes: volumes:
@ -23,8 +25,10 @@ services:
build: build:
context: payload context: payload
environment: environment:
DEV: 1
NAME: ${NAME} NAME: ${NAME}
PAYLOAD_URL: ${PAYLOAD_URL} NODE_ENV: development
PAYLOAD_URL: "http://localhost:${PAYLOAD_PORT}"
PAYLOAD_PORT: ${PAYLOAD_PORT} PAYLOAD_PORT: ${PAYLOAD_PORT}
PAYLOAD_SECRET: ${PAYLOAD_SECRET} PAYLOAD_SECRET: ${PAYLOAD_SECRET}
MONGODB_USER: MONGODB_USER:
@ -35,8 +39,10 @@ services:
volumes: volumes:
- ./payload/src:/base/src - ./payload/src:/base/src
- ./astro/src/types.ts:/types.ts - ./astro/src/types.ts:/types.ts
volumes:
- payload_media:/prod/dist/media
ports: ports:
- 3001:3001 - ${PAYLOAD_PORT}:${PAYLOAD_PORT}
networks: networks:
- front - front
- back - back
@ -65,3 +71,4 @@ networks:
volumes: volumes:
mongo: mongo:
payload_media: