You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-17Lines changed: 39 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,39 +57,61 @@ The easiest way to deploy Kan is through Railway. We've partnered with Railway t
57
57
58
58
### Docker Compose
59
59
60
-
Alternatively, you can self-host Kan with Docker Compose. This will set up everything for you including your postgres database.
60
+
Alternatively, you can self-host Kan with Docker Compose. This will set up everything for you including your postgres database and automatically run migrations.
61
61
62
-
1. Create a new file called `docker-compose.yml` and paste the following configuration:
62
+
1. Create a `.env` file with your environment variables (see [Environment Variables](#environment-variables-) section below)
63
+
64
+
2. Use the provided `docker-compose.yml` file or create your own with the following configuration:
test: ["CMD-SHELL", "pg_isready -U kan -d kan_db"]
112
+
interval: 5s
113
+
timeout: 5s
114
+
retries: 10
93
115
restart: unless-stopped
94
116
networks:
95
117
- kan-network
@@ -101,23 +123,23 @@ volumes:
101
123
kan_postgres_data:
102
124
```
103
125
104
-
2. Start the containers in detached mode:
126
+
3. Start the containers in detached mode:
105
127
106
128
```bash
107
129
docker compose up -d
108
130
```
109
131
110
-
3. Access Kan at http://localhost:3000
132
+
The `migrate` service will automatically run database migrations before the web service starts. The application will be available at http://localhost:3000 (or the port specified in `WEB_PORT`).
111
133
112
-
The application will be running in the background. You can manage the containers using these commands:
134
+
**Managing containers:**
113
135
114
136
- To stop the containers: `docker compose down`
115
137
- To view logs: `docker compose logs -f`
138
+
- To view logs for a specific service: `docker compose logs -f web` or `docker compose logs -f migrate`
116
139
- To restart the containers: `docker compose restart`
140
+
- To rebuild after code changes: `docker compose up -d --build`
117
141
118
-
For the complete Docker Compose configuration, see [docker-compose.yml](./docker-compose.yml) in the repository.
119
-
120
-
> **Note**: The Docker Compose configuration shown above is a minimal example. For a complete setup with all features (email, OAuth, file uploads, etc.), you'll need to create a `.env` file with the required environment variables. See the Environment Variables section below for the full list of available options.
142
+
For the complete Docker Compose configuration with all optional features, see [docker-compose.yml](./docker-compose.yml) in the repository.
0 commit comments