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
-[Installation and Usage Using Docker](#installation-and-usage-using-docker)
24
14
-[Docker Dependencies](#docker-dependencies)
25
15
-[Docker for Localhost Development](#docker-for-localhost-development)
26
16
-[Docker for Production Deployment](#docker-for-production-deployment)
27
-
-[Option #1 - Client and Server as (2) Separate Images and Services](#option-1---client-and-server-as-2-separate-images-and-services)
28
-
-[Option #2 - Client and Server Bundled in (1) Image and Service](#option-2---client-and-server-bundled-in-1-image-and-service)
29
17
-[Pre-built Server Docker Image](#pre-built-server-docker-image)
30
-
-[Steps](#steps)
31
18
-[References](#references)
32
19
33
20
## Requirements
@@ -210,7 +197,7 @@ The following docker-compose commands build small `client` and `server` images t
210
197
The following docker-compose commands build a small `server` image targeted for creating an optimized dockerized Express app running on self-managed production servers. The frontend `client` is served in an a static directory using the Express static middleware.
211
198
212
199
1. Install and set up the required **client** and **server** environment variables as with the required variables on [**Docker for Localhost Development**](#docker-for-localhost-development).
213
-
-> **INFO:** This method requires CORS checking dissabled, since the client and server will run on the same port (3001).
200
+
-> **INFO:** This build method requires CORS checking dissabled, since the client and server will run on the same port (3001).
214
201
> - Disable CORS by setting `ALLOW_CORS=0` in the **.env** file to avoid `Same Origin` errors.
215
202
2. Build the client and server docker services for production deployment.
216
203
-`docker-compose -f docker-compose-app.yml build`
@@ -227,34 +214,45 @@ The following docker-compose commands build a small `server` image targeted for
227
214
228
215
## Pre-built Server Docker Image
229
216
230
-
The `server` component of **firebase-users-admin** is available as a stand-alone docker image on Docker Hub with customizable environment variables (.env file). The server also serves the pre-built `client` website from a static directory using the `express.static()` middleware.
217
+
The `server` component of **firebase-users-admin** is available as a stand-alone docker image on Docker Hub with customizable environment variables (.env file).
218
+
219
+
The server also serves the pre-built `client` website from a static directory using the `express.static()` middleware, following the build instructions from [**Option #2 - Client and Server Bundled in (1) Image and Service**](#option-2---client-and-server-bundled-in-1-image-and-service).
231
220
232
221
### Steps
233
222
234
-
1. Pull the (production) **/server**[docker image](https://hub.docker.com/repository/docker/ciatphdev/firebase-users-admin-server) from Docker Hub.
- Read [**Installation - server #3**](#server) for more information.
238
-
- Replace the variables accordingly in the `.env` file.
227
+
- Replace the variables accordingly in the `.env` file. Set `ALLOW_CORS=0` to allow `Same Origin` requests. Read [**Option #2 - Client and Server Bundled in (1) Image and Service**](#option-2---client-and-server-bundled-in-1-image-and-service) for more information.
Copy file name to clipboardExpand all lines: server/src/utils/templates/header.md
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,30 +19,40 @@ password: 123456789
19
19
20
20
firebase-users-admin's server component, hosting all the listed endpoints below is available as a stand-alone [docker image](https://hub.docker.com/r/ciatphdev/firebase-users-admin-server) on Docker Hub with customizable environment variables (.env file).
21
21
22
-
1. Pull the (production) **/server** docker image from Docker Hub.
The server also serves a pre-built [`client`](https://github.com/ciatph/firebase-users-admin/tree/dev/client) website from a static directory using the `express.static()` middleware, following the build instructions from [**Option #2 - Client and Server Bundled in (1) Image and Service**](https://github.com/ciatph/firebase-users-admin#option-2---client-and-server-bundled-in-1-image-and-service).
23
+
24
+
1. Pull the (production) **/server**[docker image](https://hub.docker.com/repository/docker/ciatphdev/firebase-users-admin-server) from Docker Hub.
- Read [**Installation - server #3**](https://github.com/ciatph/firebase-users-admin#server) for more information.
26
-
- Replace the variables accordingly in the `.env` file.
28
+
- Replace the variables accordingly in the `.env` file. Set `ALLOW_CORS=0` to allow `Same Origin` requests. Read [**Option #2 - Client and Server Bundled in (1) Image and Service**](https://github.com/ciatph/firebase-users-admin#option-2---client-and-server-bundled-in-1-image-and-service) for more information.
0 commit comments