Skip to content

Commit 09f94ff

Browse files
authored
Merge pull request #183 from Peppermint-Lab/next
Next
2 parents c966c4e + 86ded0e commit 09f94ff

File tree

9 files changed

+13797
-1270
lines changed

9 files changed

+13797
-1270
lines changed

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ version: "3.1"
4646
services:
4747
peppermint_postgres:
4848
container_name: peppermint_postgres
49-
profiles:
50-
- prod
51-
- dev
52-
- test
5349
image: postgres:latest
5450
restart: always
5551
ports:
@@ -70,10 +66,6 @@ services:
7066
restart: always
7167
depends_on:
7268
- peppermint_postgres
73-
profiles:
74-
- prod
75-
depends_on:
76-
- postgres
7769
healthcheck:
7870
test: ["CMD", "sh", "-c", "wget --spider $$BASE_URL"]
7971
interval: 30s
@@ -84,9 +76,11 @@ services:
8476
DB_PASSWORD: "1234"
8577
DB_HOST: "peppermint_postgres"
8678
SECRET: 'peppermint4life'
87-
79+
API_URL: "http://localhost:5003"
80+
8881
volumes:
8982
pgdata:
83+
9084
```
9185

9286
Once this is completed then you can go to your base_url which was added to the compose file and login.

apps/client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
8-
"start": "next start"
8+
"start": "next start",
9+
"docker": "next build && next start"
910
},
1011
"dependencies": {
1112
"@headlessui/react": "^1.4.2",

docker-compose.dev.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232
DB_USERNAME: "peppermint"
3333
DB_PASSWORD: "1234"
3434
DB_HOST: "peppermint_postgres"
35+
SECRET: 'peppermint4life'
3536
API_URL: "http://localhost:5003"
3637

3738
volumes:

docker-compose.local.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
build: "."
2020
ports:
2121
- 3000:3000
22-
- 5003:5003
22+
- 5001:5003
2323
restart: always
2424
depends_on:
2525
- peppermint_postgres
@@ -32,7 +32,8 @@ services:
3232
DB_USERNAME: "peppermint"
3333
DB_PASSWORD: "1234"
3434
DB_HOST: "peppermint_postgres"
35-
API_URL: "http://localhost:5003"
35+
SECRET: 'peppermint4life'
36+
API_URL: "http://localhost:5001"
3637

3738
volumes:
3839
pgdata:

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232
DB_USERNAME: "peppermint"
3333
DB_PASSWORD: "1234"
3434
DB_HOST: "peppermint_postgres"
35+
SECRET: 'peppermint4life'
3536
API_URL: "http://localhost:5003"
3637

3738
volumes:

dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ COPY apps/api/package*.json ./apps/api/
1111
COPY apps/client/package*.json ./apps/client/
1212
COPY ./ecosystem.config.js ./ecosystem.config.js
1313

14-
1514
RUN npm i -g prisma
1615
RUN npm i -g typescript@latest -g --force
1716

@@ -23,7 +22,7 @@ RUN cd apps/api && npm install --production
2322
RUN cd apps/api && npm i --save-dev @types/node && npm run build
2423

2524
RUN cd apps/client && yarn install --production --ignore-scripts --prefer-offline --network-timeout 1000000
26-
RUN cd apps/client && yarn add --dev typescript @types/node --network-timeout 1000000 && yarn build
25+
RUN cd apps/client && yarn add --dev typescript @types/node --network-timeout 1000000
2726

2827
FROM node:lts AS runner
2928

ecosystem.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module.exports = {
22
apps: [
33
{
44
name: "client",
5-
script: "npm run start",
5+
script: "npm run docker",
66
cwd: "apps/client",
77
instances: "1",
88
autorestart: true,

0 commit comments

Comments
 (0)