Skip to content

Commit 23daad7

Browse files
committed
Update README.md
1 parent d741c4d commit 23daad7

1 file changed

Lines changed: 41 additions & 19 deletions

File tree

README.md

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ See the [docs](docs/README.md) folder.
2222

2323
## Requirements
2424

25-
- Docker: 17.04.0+
26-
- docker-compose or Compose V2 (included in the latest releases of docker-cli)
27-
- Node.js: 14+
28-
- npm: 6+
25+
- If using Docker:
26+
- Docker: 17.04.0+
27+
- docker-compose or Compose V2 (included in the latest releases of docker-cli)
28+
- For development, or if running without Docker:
29+
- Node.js: 14+
30+
- npm: 6+
2931

30-
> To run the project (dev or production), only Docker and Docker Compose are required.
31-
> Having also Node.js and npm installed locally makes the development easier.
32+
To run the project (dev or production), only Docker and Docker Compose are required.
33+
For actual development, you'll want to have Node.js and npm installed locally in order to manage dependencies.
3234

3335
<!--
3436
### Create fake data
@@ -61,24 +63,43 @@ Only follow this if you don't use the Docker container.
6163
7. Follow Mac instructions step 6
6264
-->
6365

64-
## Getting started
66+
## Production setup
6567

66-
### For developers
67-
1. Create a `.env` file at the root of this repository.
68-
For the contents of the .env file, take a look at [.env.example](./.env.example).
69-
2. Run `npm install` to install packages (this also triggers lerna bootstrap via postinstall script).
68+
TODO. (This file has lots of outdated information as comments.)
7069

71-
The more detailed introduction can be read from [documentation](docs/README.md).
70+
## For developers
7271

73-
### Running the development version
74-
> Development setup is built using docker and docker compose. The [compose file for dev setup](./docker-compose.yml) is
75-
> located at the root of this repository, and it contains a pre-configured postgres server so external database server
76-
> is not required.
72+
See the [documentation](docs/README.md) for more information.
7773

78-
1. Create a `.env` file (*see instructions from the For developers section*).
79-
2. Go to the repository root and run `docker-compose up`.
80-
This builds the dev container and starts ilmomasiina to listen at [http://localhost:3000](http://localhost:3000).
74+
### Development setup using Docker Compose
8175

76+
The entire development setup can be run within Docker using Docker Compose. The
77+
[docker-compose dev setup](./docker-compose.yml) is located at the root of this repository, and contains a
78+
pre-configured Postgres server, so an external database server is not required.
79+
80+
1. Create a `.env` file at the root of this repository. You can copy [.env.example](./.env.example) to begin.
81+
2. Go to the repository root and run `docker-compose up`. This builds the dev container and starts the frontend and
82+
backend servers in parallel.
83+
3. Access the app at <http://localhost:3000>.
84+
85+
Due to how the dev Docker is set up, you will need to rebuild the development image if you change the dependencies,
86+
package.json or ESLint configs.
87+
88+
### Non-containerized development setup
89+
90+
You can also run the development server outside Docker.
91+
92+
1. Install Postgres or MySQL. You can use Docker for this. SQLite may also work. but is not currently tested.
93+
2. Create a `.env` file at the root of this repository. You can copy [.env.example](./.env.example) to begin.
94+
3. Run `npm install` to install Lerna and other global dependencies. The postinstall script should automatically run
95+
`lerna bootstrap` to setup cross-dependencies between packages and install package dependencies.
96+
4. Run `npm start`. This will start the frontend and backend dev servers in parallel.
97+
- If you want cleaner output, you can run `npm start` separately in `packages/ilmomasiina-frontend` and
98+
`packages/ilmomasiina-backend`.
99+
- Currently, there is no way to run the Webpack development server directly within the backend process.
100+
5. Access the app at <http://localhost:3000>.
101+
102+
<!-- TODO
82103
### Creating first admin user
83104
> By default, only logged-in admin users can create new admin users using the `/admin` endpoint.
84105
> To create the first one, admin registration needs to be allowed.
@@ -143,3 +164,4 @@ git pull otax/master
143164
npm run compile
144165
pm2 restart prod-server
145166
```
167+
-->

0 commit comments

Comments
 (0)