Reduce number of seeded users for faster start
This commit is contained in:
@ -11,6 +11,7 @@ RUN npm ci
|
|||||||
FROM deps AS develop
|
FROM deps AS develop
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY dev-entrypoint.sh /entrypoint.sh
|
COPY dev-entrypoint.sh /entrypoint.sh
|
||||||
|
COPY .env.example /app/.env
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
RUN cat /entrypoint.sh
|
RUN cat /entrypoint.sh
|
||||||
ENV NODE_ENV=development
|
ENV NODE_ENV=development
|
||||||
@ -38,4 +39,4 @@ COPY --from=production-deps /app/node_modules /app/node_modules
|
|||||||
COPY --from=build /app/build /app
|
COPY --from=build /app/build /app
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD ["node", "./bin/server.js"]
|
CMD ["node", "./bin/server.js"]
|
||||||
|
@ -9,7 +9,7 @@ export default class extends BaseSeeder {
|
|||||||
console.log('Database already seeded, skipping...')
|
console.log('Database already seeded, skipping...')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const users = Array.from({ length: 1000 }).map(() => ({
|
const users = Array.from({ length: 200 }).map(() => ({
|
||||||
fullName: faker.person.fullName(),
|
fullName: faker.person.fullName(),
|
||||||
email: faker.internet.email(),
|
email: faker.internet.email(),
|
||||||
password: 'password123',
|
password: 'password123',
|
||||||
|
@ -4,7 +4,6 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: backend
|
context: backend
|
||||||
target: develop
|
target: develop
|
||||||
env_file: ./backend/.env
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend:/app
|
- ./backend:/app
|
||||||
- node_modules:/app/node_modules
|
- node_modules:/app/node_modules
|
||||||
@ -12,4 +11,4 @@ services:
|
|||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
volumes:
|
volumes:
|
||||||
node_modules: {}
|
node_modules: {}
|
||||||
|
@ -39,8 +39,6 @@ services:
|
|||||||
image: postgres:latest
|
image: postgres:latest
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=postgres
|
- POSTGRES_PASSWORD=postgres
|
||||||
env_file:
|
|
||||||
- ./backend/.env
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: pg_isready --d postgres --user postgres
|
test: pg_isready --d postgres --user postgres
|
||||||
interval: 5s
|
interval: 5s
|
||||||
@ -51,4 +49,4 @@ services:
|
|||||||
# Isolate our node_modules from our host system. Docker will handle creating these volumes
|
# Isolate our node_modules from our host system. Docker will handle creating these volumes
|
||||||
volumes:
|
volumes:
|
||||||
frontend_node_modules:
|
frontend_node_modules:
|
||||||
backend_node_modules:
|
backend_node_modules:
|
||||||
|
Reference in New Issue
Block a user