Docker compose images for LCS projects.
The CoreApis container is needed for all projects. Start it first. Then start the project you wish to work on.
- Browse to the /Containers/Dev folder and then to the project you wish to work on (CoreApis, Chums, etc)
- Run
docker-compose up -d
to create the environment. This will take about 5 minutes the first time. - Refer to the list of ports below and open the main project in your browser (http://localhost:3101 - ChumsApp)
- Install "Docker" and "Remote Containers" extension.
- Expand the Docker folder on the left of VSCode
- Expand the container you are using to see a list of apps. Right click the desired app and select "Attach Visual Studio Code". This will launch a new instance of VSCode tied to that app.
- In the files section of the new VSCode instance, select "Open Folder" and enter "/app/"
- To view console output, in the original VSCode instance, right click on the app and select "View Logs"
- Clone the project and go to the /Containers/Prod folder
- Copy sample.env to .env and edit the variables
- Optional - The compose file is for the full ChurchApps stack. If you do not wish to install all the components, simply comment out the ones you do not need.
ENVIRONMENT=dev
set the environment as dev or prodMYSQL_ROOT_PASSWORD=123456
set the Mysql passwordMYSQL_USERNAME=root
the username for the MysqlMYSQL_HOSTNAME=fs-mysql
the hostname for your Mysql server, leave default value if you dont want to use an external MysqlJWT_SECRET_KEY=jsonwebtockenkey
make up a secret phrase for encrypting keysJWT_EXPIRATION=2 days
PROTOCOL=http
http or httpsDOMAIN=localhost
your domain nameGOOGLE_ANALYTICS=UA-123456789-1
your google analytics key - optionalSUPPORT_EMAIL=support@example.com
the email for support
After cloning this repo to a local directory, you can either use docker-compose to start all the microservices of a project, or you can use docker commands in each directory to start each docker microservice from its docker file.
- Build and start the dockers the first time:
docker-compose up -d
- Stop the docker container:
docker-compose stop
- Restart the docker container:
docker-compose start
- Reset everything except MySql:
docker-compose down
followed bydocker-compose build --no-cache
anddocker-compose up -d
- Reset everything including MySql:
docker-compose down -v
followed bydocker-compose build --no-cache
anddocker-compose up -d
- Completely reinstall everything:
docker-compose down --rmi local
followed bydocker-compose build --no-cache
anddocker-compose up -d
Running the full stack can require a lot of RAM. If that is an issue, you can set a max memory limit for WSL2 in Windows by creating a C:\Users\[yourprofile]\.wslconfig
file and adding these two lines (using any memory limit you choose):
[wsl2]
memory=6GB
Reboot after making the changes.
Note: If you restrict the memory usage too much, the containers may be slow to start an time out on initial started. Simply starting the failed ones individually should resolve this though.
Type | Category | Component | Port |
---|---|---|---|
CoreApi | Core | ContentApi | 8082 |
MembershipApi | 8083 | ||
GivingApi | 8084 | ||
AttendanceApi | 8085 | ||
MessagingApi (REST) | 8086 | ||
MessagingApi (Socket) | 8087 | ||
ReportingApi | 8089 | ||
Projects | B1 | B1App | 3301 |
Chums | ChumsApp | 3101 | |
Lessons | LessonsApi | 8090 | |
LessonsApp | 3501 | ||
Brochure | ChurchAppsWeb | 3400 | |
Content | 3402 |