mirror of
https://github.com/bitnami/containers.git
synced 2026-03-29 16:27:49 +08:00
Updated whole repo for 1.7.2 release with sidekiq
This commit is contained in:
@@ -11,8 +11,8 @@ RUN install_packages zlib1g libssl1.0.0 libc6 libcurl3 libidn11 librtmp1 libssh2
|
||||
|
||||
# Additional modules required
|
||||
RUN bitnami-pkg install git-2.10.1-1 --checksum 454e9eb6fb781c8d492f9937439dcdfc1a931959d948d4c70e79716d2ea51a2b
|
||||
RUN bitnami-pkg install postgresql-client-9.6.1-1 --checksum 9a793e2413490cdf5f9fdd1e9923f7a30ee196b5348a11583c1a4136893f39f8
|
||||
RUN bitnami-pkg install discourse-sidekiq-1.7.2-0 --checksum 1f79a5eab328d444b14f598f686d9548b57865737949853e77d20e1190604a7f
|
||||
RUN bitnami-pkg unpack postgresql-client-9.6.2-1 --checksum 363d32e555bb33e1e13c744d6921a91d933d7e54a5c990b2e66f4e12ec91e442
|
||||
RUN bitnami-pkg unpack discourse-sidekiq-1.7.2-0 --checksum 1f79a5eab328d444b14f598f686d9548b57865737949853e77d20e1190604a7f
|
||||
RUN bitnami-pkg install ruby-2.3.3-1 --checksum 107c8f5e76b77a351cfb7e3e544f9b86b8633eae563f179349137cab70b8d841
|
||||
|
||||
# Install discourse
|
||||
@@ -25,10 +25,15 @@ ENV DISCOURSE_USERNAME="user" \
|
||||
DISCOURSE_EMAIL="user@example.com" \
|
||||
POSTGRES_USER="postgres" \
|
||||
POSTGRES_MASTER_HOST="postgresql" \
|
||||
REDIS_MASTER_HOST="redis"
|
||||
REDIS_MASTER_HOST="redis" \
|
||||
POSTGRESQL_USERNAME="bn_discourse" \
|
||||
POSTGRESQL_USERPASSWORD="bitnami1" \
|
||||
POSTGRESQL_DATABASE="bitnami_application"
|
||||
|
||||
VOLUME ["/bitnami/discourse"]
|
||||
|
||||
VOLUME ["/bitnami/discourse-sidekiq"]
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["/app-entrypoint.sh"]
|
||||
|
||||
@@ -39,7 +39,13 @@ services:
|
||||
depends_on:
|
||||
- postgresql
|
||||
- redis
|
||||
|
||||
sidekiq:
|
||||
image: 'bitnami/discourse:latest'
|
||||
depends_on:
|
||||
- discourse
|
||||
volumes:
|
||||
- 'sidekiq_data:/bitnami/discourse-sidekiq'
|
||||
command: 'nami start --foreground discourse-sidekiq'
|
||||
volumes:
|
||||
postgresql_data:
|
||||
driver: local
|
||||
@@ -47,6 +53,8 @@ volumes:
|
||||
driver: local
|
||||
discourse_data:
|
||||
driver: local
|
||||
sidekiq_data:
|
||||
driver: local
|
||||
```
|
||||
|
||||
Launch the containers using:
|
||||
@@ -117,7 +125,14 @@ services:
|
||||
depends_on:
|
||||
- postgresql
|
||||
- redis
|
||||
```
|
||||
sidekiq:
|
||||
image: 'bitnami/discourse:latest'
|
||||
depends_on:
|
||||
- discourse
|
||||
volumes:
|
||||
- '/path/to/sidekiq-persistence:/bitnami/discourse-sidekiq'
|
||||
command: 'nami start --foreground discourse-sidekiq'
|
||||
```
|
||||
|
||||
### Mount persistent folders manually
|
||||
|
||||
@@ -149,7 +164,16 @@ In this case you need to specify the directories to mount on the run command. Th
|
||||
|
||||
*Note:* You need to give the container a name in order to Discourse to resolve the host
|
||||
|
||||
4. Run the Discourse container:
|
||||
4. Start Sidekiq in the previous network as well:
|
||||
|
||||
```
|
||||
$ docker run -d \
|
||||
--net=discourse-tier \
|
||||
--volume /path/to/sidekiq-persistence:/bitnami/discourse-sidekiq \
|
||||
bitnami/discourse nami start --foreground discourse-sidekiq
|
||||
```
|
||||
|
||||
5. Run the Discourse container:
|
||||
|
||||
```
|
||||
$ docker run -d --name discourse -p 80:80 \
|
||||
@@ -221,6 +245,9 @@ Available variables:
|
||||
- `POSTGRES_PASSWORD`: Root password for Postgresql.
|
||||
- `POSTGRES_MASTER_HOST`: Hostname for Postgresql server. Default: **postgresql**
|
||||
- `POSTGRES_MASTER_PORT`: Port used by Postgresql server. Default: **5432**
|
||||
- `POSTGRESQL_USERNAME`: Discourse application database user. **bn_discourse**
|
||||
- `POSTGRESQL_USERPASSWORD`: Discourse application database password. **bitnami1**
|
||||
- `POSTGRESQL_DATABASE`: Discourse application database name. **bitnami_application**
|
||||
- `REDIS_MASTER_HOST`: Hostname for Redis. Default: **redis**
|
||||
- `REDIS_MASTER_PORT`: Port used by Redis. Default: **6379**
|
||||
- `REDIS_PASSWORD`: Password for Redis.
|
||||
@@ -268,7 +295,7 @@ information)
|
||||
|
||||
# License
|
||||
|
||||
Copyright 2016 Bitnami
|
||||
Copyright 2017 Bitnami
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -9,7 +9,7 @@ services:
|
||||
volumes:
|
||||
- 'redis_data:/bitnami/redis'
|
||||
discourse:
|
||||
image: 'bitnami/discourse:latest'
|
||||
build: .
|
||||
ports:
|
||||
- '80:3000'
|
||||
depends_on:
|
||||
@@ -17,6 +17,13 @@ services:
|
||||
- redis
|
||||
volumes:
|
||||
- 'discourse_data:/bitnami/discourse'
|
||||
sidekiq:
|
||||
build: .
|
||||
depends_on:
|
||||
- discourse
|
||||
volumes:
|
||||
- 'sidekiq_data:/bitnami/discourse-sidekiq'
|
||||
command: 'nami start --foreground discourse-sidekiq'
|
||||
volumes:
|
||||
postgresql_data:
|
||||
driver: local
|
||||
@@ -24,3 +31,5 @@ volumes:
|
||||
driver: local
|
||||
discourse_data:
|
||||
driver: local
|
||||
sidekiq_data:
|
||||
driver: local
|
||||
|
||||
@@ -6,8 +6,16 @@ print_welcome_page
|
||||
check_for_updates &
|
||||
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
nami_initialize discourse
|
||||
info "Starting discourse..."
|
||||
if [[ "x$4" == "xdiscourse" ]]; then
|
||||
nami --log-level trace8 initialize postgresql-client --inputs-file=/postgresql-client-inputs.json
|
||||
nami_initialize discourse
|
||||
elif [[ "x$4" == "xdiscourse-sidekiq" ]] ; then
|
||||
nami_initialize discourse-sidekiq
|
||||
else
|
||||
echo "Bear in mind that only discourse and discourse-sidekiq services live within this image. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
echo "Starting $4..."
|
||||
fi
|
||||
|
||||
exec tini -- "$@"
|
||||
|
||||
@@ -9,10 +9,13 @@
|
||||
"databaseServerPort": "{{$global.env.POSTGRES_MASTER_PORT}}",
|
||||
"redisPort": "{{$global.env.REDIS_MASTER_PORT}}",
|
||||
"redisHost": "{{$global.env.REDIS_MASTER_HOST}}",
|
||||
"databaseUser": "{{$global.env.POSTGRESQL_USERNAME}}",
|
||||
"databaseName": "{{$global.env.POSTGRESQL_DATABASE}}",
|
||||
"databaseUserPassword": "{{$global.env.POSTGRESQL_USERPASSWORD}}",
|
||||
"redisPassword": "{{$global.env.REDIS_PASSWORD}}",
|
||||
"smtpHost": "{{$global.env.SMTP_HOST}}",
|
||||
"smtpPort": "{{$global.env.SMTP_PORT}}",
|
||||
"smtpUser": "{{$global.env.SMTP_USER}}",
|
||||
"smtpPassword": "{{$global.env.SMTP_PASSWORD}}",
|
||||
"smtpTls": "{{$global.env.SMTP_TLS}}"
|
||||
}
|
||||
}
|
||||
|
||||
10
bitnami/discourse/rootfs/discourse-sidekiq-inputs.json
Normal file
10
bitnami/discourse/rootfs/discourse-sidekiq-inputs.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"databaseServerHost": "{{$global.env.POSTGRES_MASTER_HOST}}",
|
||||
"databaseServerPort": "{{$global.env.POSTGRES_MASTER_PORT}}",
|
||||
"redisPort": "{{$global.env.REDIS_MASTER_PORT}}",
|
||||
"redisHost": "{{$global.env.REDIS_MASTER_HOST}}",
|
||||
"databaseUser": "{{$global.env.POSTGRESQL_USERNAME}}",
|
||||
"databaseName": "{{$global.env.POSTGRESQL_DATABASE}}",
|
||||
"databaseUserPassword": "{{$global.env.POSTGRESQL_USERPASSWORD}}",
|
||||
"redisPassword": "{{$global.env.REDIS_PASSWORD}}"
|
||||
}
|
||||
9
bitnami/discourse/rootfs/postgresql-client-inputs.json
Normal file
9
bitnami/discourse/rootfs/postgresql-client-inputs.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"databaseAdminPassword": "{{$global.env.POSTGRESQL_ROOT_PASSWORD}}",
|
||||
"databaseAdminUser": "{{$global.env.POSTGRESQL_USER}}",
|
||||
"username": "{{$global.env.POSTGRESQL_USERNAME}}",
|
||||
"database": "{{$global.env.POSTGRESQL_DATABASE}}",
|
||||
"password": "{{$global.env.POSTGRESQL_USERPASSWORD}}",
|
||||
"port": "{{$global.env.POSTGRESQL_PORT}}",
|
||||
"host": "{{$global.env.POSTGRES_MASTER_HOST}}"
|
||||
}
|
||||
Reference in New Issue
Block a user