Skip to content

Commit 4168f64

Browse files
authored
Merge branch 'main' into main
2 parents ce31c93 + fc83244 commit 4168f64

File tree

4 files changed

+4
-28
lines changed

4 files changed

+4
-28
lines changed

.github/workflows/test-template.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ jobs:
6363
#- '--fluent.db mysql' # The MySQL image can't be configured usably via GH Actions at this time
6464
- '--fluent.db postgres'
6565
- '--fluent.db sqlite'
66-
- '--fluent.db mongo'
6766
leafflags:
6867
- '--leaf'
6968
- '--no-leaf'
@@ -72,13 +71,10 @@ jobs:
7271
# dbhostname: mysql
7372
- fluentflags: '--fluent.db postgres'
7473
dbhostname: psql
75-
- fluentflags: '--fluent.db mongo'
76-
dbhosturl: 'mongodb://mongo:27017/vapor_database'
7774
runs-on: ubuntu-latest
7875
container: ${{ matrix.swift-image }}
7976
needs: cache-toolbox
8077
services:
81-
mongo: { image: 'mongo:latest' }
8278
#mysql:
8379
# image: mysql:latest
8480
# env: { MYSQL_ALLOW_EMPTY_PASSWORD: 'true', MYSQL_USER: vapor_username, MYSQL_PASSWORD: vapor_password, MYSQL_DATABASE: vapor_database }
@@ -133,7 +129,6 @@ jobs:
133129
- '--fluent.db mysql'
134130
- '--fluent.db postgres'
135131
- '--fluent.db sqlite'
136-
- '--fluent.db mongo'
137132
leafflags:
138133
- '--leaf'
139134
- '--no-leaf'

Sources/App/configure.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ public func configure(_ app: Application) async throws {
2222
username: Environment.get("DATABASE_USERNAME") ?? "vapor_username",
2323
password: Environment.get("DATABASE_PASSWORD") ?? "vapor_password",
2424
database: Environment.get("DATABASE_NAME") ?? "vapor_database"
25-
), as: .mysql){{/fluent.db.is_mysql}}{{#fluent.db.is_mongo}} try app.databases.use(DatabaseConfigurationFactory.mongo(
26-
connectionString: Environment.get("DATABASE_URL") ?? "mongodb://localhost:27017/vapor_database"
27-
), as: .mongo){{/fluent.db.is_mongo}}{{#fluent.db.is_sqlite}} app.databases.use(DatabaseConfigurationFactory.sqlite(.file("db.sqlite")), as: .sqlite){{/fluent.db.is_sqlite}}
25+
), as: .mysql){{/fluent.db.is_mysql}}{{#fluent.db.is_sqlite}} app.databases.use(DatabaseConfigurationFactory.sqlite(.file("db.sqlite")), as: .sqlite){{/fluent.db.is_sqlite}}
2826

2927
app.migrations.add(CreateTodo()){{/fluent}}{{#leaf}}
3028

docker-compose.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ volumes:
1919
db_data:{{/db.is_sqlite}}{{/fluent}}
2020

2121
x-shared_environment: &shared_environment
22-
LOG_LEVEL: ${LOG_LEVEL:-debug}{{#fluent}}{{^db.is_sqlite}}{{^db.is_mongo}}
22+
LOG_LEVEL: ${LOG_LEVEL:-debug}{{#fluent}}{{^db.is_sqlite}}
2323
DATABASE_HOST: db
2424
DATABASE_NAME: vapor_database
2525
DATABASE_USERNAME: vapor_username
26-
DATABASE_PASSWORD: vapor_password{{/db.is_mongo}}{{/db.is_sqlite}}{{#db.is_mongo}}
27-
DATABASE_URL: mongodb://db:27017/vapor_database{{/db.is_mongo}}{{/fluent}}
26+
DATABASE_PASSWORD: vapor_password{{/db.is_sqlite}}{{/fluent}}
2827

2928
services:
3029
app:
@@ -82,11 +81,4 @@ services:
8281
MYSQL_DATABASE: vapor_database
8382
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
8483
ports:
85-
- '3306:3306'{{/db.is_mysql}}{{#db.is_mongo}}
86-
db:
87-
image: mongo:latest
88-
volumes:
89-
- db_data:/data/db
90-
restart: unless-stopped
91-
ports:
92-
- '27017:27017'{{/db.is_mongo}}{{/fluent}}
84+
- '3306:3306'{{/db.is_mysql}}{{/fluent}}

manifest.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,6 @@ variables:
3535
version: "4.6.0"
3636
is_sqlite: true
3737
emoji: "\U0001FAB6"
38-
- name: Mongo
39-
description: ""
40-
data:
41-
module: Mongo
42-
url: mongo
43-
id: mongo
44-
version: "1.3.1"
45-
is_mongo: true
46-
emoji: "\U0001F331"
4738
- name: leaf
4839
description: Would you like to use Leaf (templating)?
4940
type: bool

0 commit comments

Comments
 (0)