fix: local docker-compose setup (#460)

This commit is contained in:
Karol Sójko
2020-09-01 16:16:40 +02:00
committed by GitHub
parent 153d05d58c
commit 6a1c10d3f7
5 changed files with 64 additions and 22 deletions

View File

@@ -62,11 +62,25 @@ Questions? Find answers on our [Help page](https://standardnotes.org/help).
---
### Running with Docker image
### Docker setup
You can run the application by using our [official Docker image](https://hub.docker.com/r/standardnotes/web)
Docker is the quick and easy way to try out Standard Notes. We highly recommend using our official [Docker hub image](https://hub.docker.com/repository/docker/standardnotes/web).
Make sure you are using the appropriate tag for your use case. `develop` branch is tagged with `latest` and `master` branch is tagged with `stable`.
### Standalone instance
Before you start make sure you have a `.env` file copied from the sample `env.sample` and configured with your parameters.
If your intention is not contributing but just running the app we recommend using our official image from Docker hub like this:
```
docker run -d -p 3001:3001 --env-file=your-env-file standardnotes/web:stable
```
Or if you want to use the `develop` branch that is in a work-in-progress state please use:
```
docker run -d -p 3001:3001 --env-file=your-env-file standardnotes/web:latest
```
You can then access the app at `http://localhost:3001` (please check Docker container logs if the server has started already and is listening on connections).
### Running Locally
@@ -83,21 +97,6 @@ This repo contains the core code used in the web app, as well as the Electron-ba
Then open your browser to `http://localhost:3001`.
### Running Locally with Docker
To run the app locally with Docker, first create a configuration file:
```
cp .env.sample .env
```
Adjust the configuration file if needed. Then start the application by typing:
```
docker-compose build
docker-compose up
```
---
**Extensions Manager and Batch Manager:**
@@ -124,3 +123,17 @@ SF_DEFAULT_SERVER=https://sync.myserver
- Desktop app: https://github.com/standardnotes/desktop
- Mobile (iOS & Android): https://github.com/standardnotes/mobile
- Extensions: https://github.com/sn-extensions
## Contributing
For contributing we highly recommend you use our docker-compose setup that is provided in this repository.
### Docker compose setup
Use the included [docker-compose.yml](docker-compose.yml) file to build Standard Notes with `docker-compose`. Once your `.env` file has been copied and configured, simply run:
```
docker-compose up -d
```
This should load the app container and run the necessary scripts. You should then be able to reach the app at `http://localhost:3001`