Skip to content

Commit 909ad3b

Browse files
authored
Merge pull request #87 from ciatph/dev
v1.1.8
2 parents 8019f64 + a707b2e commit 909ad3b

File tree

3 files changed

+34
-22
lines changed

3 files changed

+34
-22
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ jobs:
149149
# Push the development (client/server) Docker images
150150
docker-build-push-dev:
151151
name: Push Dev Docker
152-
if: github.event.release.target_commitish == 'master'
152+
if: github.event.release.target_commitish == 'master' && vars.DOCKERHUB_USERNAME != ''
153153
runs-on: ubuntu-latest
154154
steps:
155155
- name: Login to Docker Hub

README.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ A basic web app client in the **/client** directory will show basic API usage an
2727
- Pricing Plan: Spark plan or higher
2828
- with the **Email/Password** Provider enabled in the Firebase Console's
2929
**Authentication** -> **Sign-in method** -> **Sign-in providers** options.
30+
- with **Firebase (Web) Application** enabled in the Firebase Console's **Project Settings** -> **Your Apps**
3031
- Service account credentials JSON file
3132

3233
### Core Libraries and Frameworks
3334

34-
1. [firebase-admin](https://www.npmjs.com/package/firebase-admin) v10.0.2
35+
1. [Firebase-admin](https://www.npmjs.com/package/firebase-admin) v10.0.2
3536
2. [Firebase Authentication](https://firebase.google.com/docs/auth) (using Email/Password Provider)
3637
3. React 18.1.0 (CRA) on client app
3738

@@ -273,36 +274,43 @@ The server also serves the pre-built `client` website from a static directory us
273274
274275
## Pre-built Server Docker Image (Client + Server) Development
275276
276-
Pre-built Docker images of the **server** and **client** for local development are also available on Docker Hub at:
277+
This project also deploys the latest **client** and **server** development Docker images to Docker Hub on the creation of new Release/Tags. Pre-built Docker images for local development are available on Docker Hub at:
277278
278-
- **client**<br>
279-
https://hub.docker.com/r/ciatphdev/firebase-users-client/tags
279+
https://hub.docker.com/r/ciatphdev/firebase-users-admin
280280
281-
- **server**<br>
282-
https://hub.docker.com/r/ciatphdev/firebase-users-server/tags
283281
284-
### Usage Options
282+
1. Pull the pre-built development Docker images using any of the two (2) options:
283+
- Navigate to the gsites-components root project directory, then run:<br>
284+
`docker compose -f docker-compose.dev.yml pull`
285+
- Open a terminal and run:<br>
286+
```
287+
docker pull ciatphdev/firebase-users-admin:client
288+
docker pull ciatphdev/firebase-users-admin:server
289+
```
285290
286-
- Use with the docker-compose.dev.yml file (requires a `.env` file input parameter):<br>
287-
`docker compose -f docker-compose.dev.yml pull`
291+
2. Follow the instructions in the README files inside the **/client** and **/server** directories for more information on configuring and using the client and server apps.
288292
289-
- Docker pull<br>
290-
```
291-
docker pull ciatphdev/firebase-users-client:latest
292-
docker pull ciatphdev/firebase-users-server:latest
293-
```
294-
- Docker run (requires a `.env` file input parameter):<br>
295-
```
296-
docker run -it --rm --env-file .env -p 3000:3000 ciatphdev/firebase-users-client:latest
297-
docker run -it --rm --env-file .env -p 3001:3001 ciatphdev/firebase-users-server:latest
298-
```
293+
3. Run the development images using any of the two (2) options (requires a `.env` file input parameter):
294+
- Run with Docker compose:<br>
295+
`docker compose -f docker-compose.dev.yml up`
296+
- Run with Docker:<br>
297+
```
298+
docker run -it --rm --env-file .env -p 3000:3000 ciatphdev/firebase-users-admin:client
299+
docker run -it --rm --env-file .env -p 3001:3001 ciatphdev/firebase-users-admin:server
300+
```
299301
300302
## Deploy with GitHub Actions
301303
304+
Deployment with GitHub Actions to live environments and Docker Hub is optional. Supply the following **GitHub Secrets** and **GitHUb Variables** if there is a need to deploy and push the client and server apps to live environments.
305+
306+
> [!INFO]
307+
> Live server deployment to a new cloud hosting provider is currently under construction. Previous versions used to deploy it in a free-tier Heroku server.
308+
302309
### Requirements
303310
304311
1. Firebase project
305312
- with Authentication (Email/Password) activated
313+
- with Firebase Hosting activated (Refer to the `/client/.firebaserc` file for more information about the project structure)
306314
2. Docker Hub account
307315
308316
### Steps
@@ -326,6 +334,10 @@ https://hub.docker.com/r/ciatphdev/firebase-users-server/tags
326334
| DOCKERHUB_USERNAME | Docker Hub username |
327335
| DOCKERHUB_TOKEN | Deploy token for the Docker Hub account |
328336
337+
| GitHub Variable | Description |
338+
| --- | --- |
339+
| DOCKERHUB_USERNAME | Docker Hub username |
340+
329341
2. Create Release/Tag from the `master` branch to trigger deployment to the **production** environment:
330342
- Deploy front end (React) to Firebase Hosting
331343
- Build and push Docker images to Docker Hub

docker-compose.dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ services:
22
# Create React App (CRA) running on development mode
33
client-dev:
44
container_name: client-dev
5-
image: ciatphdev/firebase-users-client:latest
5+
image: ciatphdev/firebase-users-admin:client
66
env_file:
77
- ./client/.env
88
build:
@@ -20,7 +20,7 @@ services:
2020
# Express app running in development mode with auto reload using nodemon
2121
server-dev:
2222
container_name: server-dev
23-
image: ciatphdev/firebase-users-server:latest
23+
image: ciatphdev/firebase-users-admin:server
2424
env_file:
2525
- ./server/.env
2626
build:

0 commit comments

Comments
 (0)