Skip to content

Commit 82c1a08

Browse files
authored
feat: Working in Docker, Connect with multiple/specific servers, etc. (#13)
* feat: add login related properties to ParseCloudUser * update docker ports * add more tests * Update readme * Make more docs public * working docker with multiple servers * make cloud-code always restart in docker * log error before restarting * improve route names * fix tests * Update dependabot.yml * improve routes * update readme * Update hydrateUser to query current server * nits * add changelog * add dashboard info to README
1 parent d56c091 commit 82c1a08

24 files changed

+1204
-205
lines changed

.env

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
PARSE_SERVER_APPLICATION_ID=applicationId
2+
PARSE_SERVER_PRIMARY_KEY=primaryKey
3+
PARSE_SERVER_WEBHOOK_KEY=webhookKey
4+
POSTGRES_PASSWORD=postgres
5+
PG_PARSE_USER=parse
6+
PG_PARSE_PASSWORD=parse
7+
PG_PARSE_DB=parse_hipaa
8+
PMM_USER=pmm
9+
PMM_PASSWORD=pmm
10+
PMM_PORT=80
11+
PMM_TLS_PORT=443
12+
MONGO_PARSE_USER=parse
13+
MONGO_PARSE_PASSWORD=parse
14+
MONGO_PARSE_DB=parse_hipaa
15+
PORT=1337
16+
MOUNT_PATH=/parse
17+
DB_PORT=5432
18+
DB_MONGO_PORT=27017
19+
DASHBOARD_PORT=4040

.github/dependabot.yml

+4
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ updates:
99
directory: "/"
1010
schedule:
1111
interval: "weekly"
12+
- package-ecosystem: "docker"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ DerivedData/
66
.DS_Store
77
db.sqlite
88
.swiftpm
9-
.env
9+
.env.*

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Parse-Server-Swift Changelog
22

33
### main
4-
[Full Changelog](https://github.com/netreconlab/parse-server-swift/compare/0.0.8...main), [Documentation](https://swiftpackageindex.com/netreconlab/parse-server-swift/main/documentation/parseserverswift)
4+
[Full Changelog](https://github.com/netreconlab/parse-server-swift/compare/0.1.0...main), [Documentation](https://swiftpackageindex.com/netreconlab/parse-server-swift/documentation)
55
* _Contributing to this repo? Add info about your change here to be included in the next release_
66

7+
### 0.1.0
8+
[Full Changelog](https://github.com/netreconlab/parse-server-swift/compare/0.0.8...0.1.0), [Documentation](https://swiftpackageindex.com/netreconlab/parse-server-swift/0.1.0/documentation/parseserverswift)
9+
10+
__Features__
11+
- Added the use of environment variables, working docker build, helper functions, and improved documentation
12+
713
### 0.0.8
814
[Full Changelog](https://github.com/netreconlab/parse-server-swift/compare/0.0.7...0.0.8), [Documentation](https://swiftpackageindex.com/netreconlab/parse-server-swift/0.0.8/documentation/parseserverswift)
915

Dockerfile

+18-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# ================================
22
# Build image
33
# ================================
4-
FROM swift:5.7-focal as build
4+
FROM swift:5.7-jammy as build
55

66
# Install OS updates and, if needed, sqlite3
77
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
88
&& apt-get -q update \
9-
&& apt-get -q dist-upgrade -y \
9+
&& apt-get -q dist-upgrade -y\
1010
&& rm -rf /var/lib/apt/lists/*
1111

1212
# Set up a build area
@@ -42,12 +42,19 @@ RUN [ -d /build/Resources ] && { mv /build/Resources ./Resources && chmod -R a-w
4242
# ================================
4343
# Run image
4444
# ================================
45-
FROM ubuntu:focal
45+
FROM ubuntu:jammy
4646

47-
# Make sure all system packages are up to date.
48-
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \
49-
apt-get -q update && apt-get -q dist-upgrade -y && apt-get -q install -y ca-certificates tzdata && \
50-
rm -r /var/lib/apt/lists/*
47+
# Make sure all system packages are up to date, and install only essential packages.
48+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
49+
&& apt-get -q update \
50+
&& apt-get -q dist-upgrade -y \
51+
&& apt-get -q install -y \
52+
ca-certificates \
53+
tzdata \
54+
libcurl4 \
55+
# If your app or its dependencies import FoundationXML, also install `libxml2`.
56+
# libxml2 \
57+
&& rm -r /var/lib/apt/lists/*
5158

5259
# Create a vapor user and group with /app as its home directory
5360
RUN useradd --user-group --create-home --system --skel /dev/null --home-dir /app vapor
@@ -61,9 +68,9 @@ COPY --from=build --chown=vapor:vapor /staging /app
6168
# Ensure all further commands run as the vapor user
6269
USER vapor:vapor
6370

64-
# Let Docker bind to port 8080
65-
EXPOSE 8080
71+
# Let Docker bind to port 8081
72+
EXPOSE 8081
6673

67-
# Start the Vapor service when the image is run, default to listening on 8080 in production environment
74+
# Start the Vapor service when the image is run, default to listening on 8081 in production environment
6875
ENTRYPOINT ["./Run"]
69-
CMD ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8080"]
76+
CMD ["serve", "--env", "production", "--hostname", "0.0.0.0", "--port", "8081"]

Package.resolved

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"repositoryURL": "https://github.com/vapor/console-kit.git",
2525
"state": {
2626
"branch": null,
27-
"revision": "a7e67a1719933318b5ab7eaaed355cde020465b1",
28-
"version": "4.5.0"
27+
"revision": "447f1046fb4e9df40973fe426ecb24a6f0e8d3b4",
28+
"version": "4.6.0"
2929
}
3030
},
3131
{
@@ -60,8 +60,8 @@
6060
"repositoryURL": "https://github.com/netreconlab/Parse-Swift.git",
6161
"state": {
6262
"branch": null,
63-
"revision": "6cca2ff16ed16137a53e6e82f5a6286f2be3cc7c",
64-
"version": "5.0.0-beta.3"
63+
"revision": "cbfed65c3bd305bbb6c0f6358201d912a94d968e",
64+
"version": "5.0.0-beta.4"
6565
}
6666
},
6767
{

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
.package(url: "https://github.com/vapor/vapor.git", .upToNextMajor(from: "4.69.1")),
1515
.package(url: "https://github.com/vapor/leaf.git", .upToNextMajor(from: "4.2.4")),
1616
.package(url: "https://github.com/netreconlab/Parse-Swift.git",
17-
.upToNextMajor(from: "5.0.0-beta.3")),
17+
.upToNextMajor(from: "5.0.0-beta.4")),
1818
],
1919
targets: [
2020
.target(

0 commit comments

Comments
 (0)