Skip to content

Commit

Permalink
Merge pull request #170 from lilla-nemeth/feature/dockerize-the-app
Browse files Browse the repository at this point in the history
Feature/dockerize the app
  • Loading branch information
lilla-nemeth authored Mar 29, 2024
2 parents 18cb61f + e16df9d commit eacf43f
Show file tree
Hide file tree
Showing 28 changed files with 10,929 additions and 19,769 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.env
/postgres-db
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,24 @@ cd client
Install the dependencies

```
npm install
yarn install
```

Start the client

```
npm start
yarn start
```

## Environment Variables

To run this app, create a .env file in the root folders of server and client and add the following environment variables
In order to run this app, create .env files in the following folders to make environment variables available.

### Main Root Folder

For docker-compose
`PG_PASSWORD`
`PG_DATABASE`

### Server

Expand All @@ -94,6 +100,12 @@ To run this app, create a .env file in the root folders of server and client and
`PG_PORT`
`PG_DATABASE`

#### Node Environment

Currently the app is not in production, but in that case this variable would be necessary

`NODE_ENV`

### Client

#### Mapbox API Key
Expand Down
24 changes: 24 additions & 0 deletions client/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

mapboxJSONdata.json
2 changes: 0 additions & 2 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
Expand Down
16 changes: 16 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM node:20

WORKDIR /app/src/client

COPY package.json .
COPY yarn.lock .

RUN yarn install

COPY . .

ENV PORT=3000

EXPOSE 3000

CMD ["yarn", "run", "start"]
Loading

0 comments on commit eacf43f

Please sign in to comment.