Skip to content

Commit c47d7ec

Browse files
authored
Merge pull request #80 from ciatph/dev
v1.1.5
2 parents 359c748 + 9e3c74c commit c47d7ec

File tree

4 files changed

+50
-16
lines changed

4 files changed

+50
-16
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ jobs:
1313
runs-on: ubuntu-latest
1414
env:
1515
REACT_APP_BASE_URL: ${{ secrets.REACT_APP_BASE_URL }}
16+
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
17+
REACT_APP_FIREBASE_AUTHDOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTHDOMAIN }}
18+
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
19+
REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}
20+
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
21+
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
22+
REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }}
1623
strategy:
1724
matrix:
1825
node-version: [14.x]

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ The server also serves the pre-built `client` website from a static directory us
236236
1. Pull the (production) **/server** [Docker image](https://hub.docker.com/repository/docker/ciatphdev/firebase-users-app) from Docker Hub.
237237
- Find the latest version tag from https://hub.docker.com/r/ciatphdev/firebase-users-app, i.e., `v1.1.5`
238238
- `docker pull ciatphdev/firebase-users-app:v1.1.5`
239-
- **NOTE:**
240239
2. Create a `.env` file.
241240
- Read [**Installation - server #3**](#server) for more information.
242241
- 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.
@@ -245,15 +244,15 @@ The server also serves the pre-built `client` website from a static directory us
245244
FIREBASE_SERVICE_ACC=YOUR-FIREBASE-PROJ-SERVICE-ACCOUNT-JSON-CREDENTIALS-ONE-LINER-NO-SPACES
246245
FIREBASE_PRIVATE_KEY=PRIVATE-KEY-FROM-FIREBASE-SERVICE-ACCOUNT-JSON-WITH-DOUBLE-QUOTES
247246
248-
ALLOW_CORS=0
249-
ALLOW_AUTH=1
247+
ALLOW_CORS=0
248+
ALLOW_AUTH=1
250249
```
251250
3. Run the image.
252251
```
253252
docker run -it --rm \
254253
--env-file .env \
255254
-p 3001:3001 \
256-
ciatphdev/firebase-users-admin-app:v1.1.2
255+
ciatphdev/firebase-users-admin-app:v1.1.5
257256
```
258257
4. Run a script in the container to create the default `[email protected]` account, if it does not yet exist in the Firestore database.
259258
`docker exec -it firebase-users-admin-app npm run seed`
@@ -280,15 +279,15 @@ https://hub.docker.com/r/ciatphdev/firebase-users-server/tags
280279
281280
### Usage Options
282281
283-
- Use with the docker-compose.dev.yml file (requires a `.env` file inside the client and server folders):<br>
282+
- Use with the docker-compose.dev.yml file (requires a `.env` file input parameter):<br>
284283
`docker compose -f docker-compose.dev.yml pull`
285284
286285
- Docker pull<br>
287286
```
288287
docker pull ciatphdev/firebase-users-client:dev
289288
docker pull ciatphdev/firebase-users-server:dev
290289
```
291-
- Docker run (requires a `.env` file inside the client and server folders):<br>
290+
- Docker run (requires a `.env` file input parameter):<br>
292291
```
293292
docker run -it --rm --env-file .env -p 3000:3000 ciatphdev/firebase-users-client:dev
294293
docker run -it --rm --env-file .env -p 3001:3001 ciatphdev/firebase-users-server:dev

docker-compose.dev.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ services:
3030
networks:
3131
- firebase-users-dev
3232
volumes:
33-
- ./server/src:/opt/server/src
33+
- ./server:/opt/server
34+
- /opt/server/node_modules
3435
ports:
3536
- "3001:3001"
3637

server/src/utils/templates/header.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,20 @@ username: [email protected]
1111
password: 123456789
1212
```
1313

14-
- **live client app:** [https://fire-auth-users.web.app/](https://fire-auth-users.web.app/)
14+
- **live client app:** [https://adminusers-dev.web.app/](https://adminusers-dev.web.app/)
1515
- **localhost app:** [http://localhost:3000](http://localhost:3000)
16-
- Read more about the localhost environment set-up instructions on [firebase-auth-users](https://github.com/ciatph/firebase-users-admin)
16+
- Read more about the localhost environment set-up instructions on [firebase-admin-users](https://github.com/ciatph/firebase-users-admin)
1717

1818
### Docker
1919

2020
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).
2121

2222
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).
2323

24-
1. Pull the (production) **/server** [docker image](https://hub.docker.com/repository/docker/ciatphdev/firebase-users-admin-server) from Docker Hub.
25-
`docker pull ciatphdev/firebase-users-admin-app:v1.1.2`
26-
2. Create a `.env` file.
24+
1. Pull the (production) **/server** [Docker image](https://hub.docker.com/repository/docker/ciatphdev/firebase-users-app) from Docker Hub.
25+
- Find the latest version tag from https://hub.docker.com/r/ciatphdev/firebase-users-app, i.e., `v1.1.5`
26+
- `docker pull ciatphdev/firebase-users-app:v1.1.5`
27+
2. Create a `.env` file.
2728
- Read [**Installation - server #3**](https://github.com/ciatph/firebase-users-admin#server) for more information.
2829
- 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.
2930
```
@@ -39,21 +40,47 @@ The server also serves a pre-built [`client`](https://github.com/ciatph/firebase
3940
docker run -it --rm \
4041
--env-file .env
4142
-p 3001:3001 \
42-
ciatphdev/firebase-users-admin-app:v1.1.2
43+
ciatphdev/firebase-users-admin-app:v1.1.5
4344
```
44-
4. Run a script in the container to create the default `[email protected]` account, if it does not yet exist in the Firestore database.
45+
4. Run a script in the container to create the default `[email protected]` account, if it does not yet exist in the Firestore database.
4546
`docker exec -it firebase-users-admin-app npm run seed`
46-
5. Launch the server API documentation on
47+
5. Launch the server API documentation on
4748
`http://localhost:3001/docs`
4849
6. Launch the client website on `http://localhost:3001`.
49-
- Login using the superadmin account create on step # 4.
50+
- Login using the superadmin account create on step # 4.
5051
```
5152
5253
password: 123456789
5354
```
5455
- Test the API routes by creating new accounts, editing or deleting existing accounts.
5556
- The signed-in user's Firebase Auth token is available on the **Home** page (http://localhost:3001/)
5657
58+
### Pre-built Server Docker Image (Client + Server) Development
59+
60+
Pre-built Docker images of the **server** and **client** for local development are also available on Docker Hub at:
61+
62+
- **client**<br>
63+
https://hub.docker.com/r/ciatphdev/firebase-users-client/tags
64+
65+
- **server**<br>
66+
https://hub.docker.com/r/ciatphdev/firebase-users-server/tags
67+
68+
### Usage Options
69+
70+
- Use with the docker-compose.dev.yml file (requires a `.env` file input parameter):<br>
71+
`docker compose -f docker-compose.dev.yml pull`
72+
73+
- Docker pull<br>
74+
```
75+
docker pull ciatphdev/firebase-users-client:dev
76+
docker pull ciatphdev/firebase-users-server:dev
77+
```
78+
- Docker run (requires a `.env` file input parameter):<br>
79+
```
80+
docker run -it --rm --env-file .env -p 3000:3000 ciatphdev/firebase-users-client:dev
81+
docker run -it --rm --env-file .env -p 3001:3001 ciatphdev/firebase-users-server:dev
82+
```
83+
5784
### References
5885
5986
- [firebase-users-admin](https://github.com/ciatph/firebase-users-admin) (GitHub repository)

0 commit comments

Comments
 (0)