Skip to content

Commit

Permalink
Docker based dev environment
Browse files Browse the repository at this point in the history
  • Loading branch information
corentin703 committed Feb 20, 2022
1 parent 75ee1c0 commit 6bdc8c4
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 0 deletions.
Empty file added dev/clean-dev.sh
Empty file.
Empty file added dev/data/.gitkeep
Empty file.
Empty file added dev/data/db/.gitkeep
Empty file.
Empty file added dev/data/pg4admin/.gitkeep
Empty file.
61 changes: 61 additions & 0 deletions dev/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: "3.7"

services:
bde_app:
container_name: bde_app
image: node:14
restart: always
working_dir: /usr/app
volumes:
- ..:/usr/app
networks:
- bde-isima-dev
ports:
- "3000:3000"
environment:
- DATABASE_URL=postgres://bde_isima:isima@bde_db:5432/bde_db
- LYDIA_API_VENDOR_ID=5f620bc31bb31257392056
- NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
- NEXT_PUBLIC_LYDIA_API_URL=https://homologation.lydia-app.com
- NEXT_PUBLIC_LYDIA_API_VENDOR_TOKEN=5f620bc30f2d6214421546
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=465
- SMTP_USER=bde.isima.webmaster
- [email protected]
- SMTP_PASSWORD=fehdwsntbftacqpj
entrypoint: sh -c
command: ./dev/start-dev.sh

bde_db:
container_name: bde_db
restart: always
image: postgres:latest
environment:
- POSTGRES_PASSWORD=isima
- POSTGRES_USER=bde_isima
- POSTGRES_DB=bde_db
- PGDATA=/var/lib/postgresql/data
volumes:
- ./data/db:/var/lib/postgresql/data
networks:
- bde-isima-dev
ports:
- "5432:5432"

bde_pg4admin:
container_name: bde_pg4admin
restart: always
image: dpage/pgadmin4:latest
environment:
- [email protected]
- PGADMIN_DEFAULT_PASSWORD=admin
volumes:
- ./data/pg4admin:/var/lib/pgadmin
ports:
- 8080:80
networks:
- bde-isima-dev

networks:
bde-isima-dev:
name: bde-isima-dev
5 changes: 5 additions & 0 deletions dev/start-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

npm i
npx blitz prisma migrate dev -n initial
npm run dev

0 comments on commit 6bdc8c4

Please sign in to comment.