Mercurial > sat_docs
annotate docker_legacy/sat_pubsub/Dockerfile @ 169:31a09c59a7bf
association: ajout du compte rendu de l'AG extraordinaire du 27 janvier 2021
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 28 Jan 2021 16:41:43 +0100 |
parents | 29873a41aae1 |
children |
rev | line source |
---|---|
164
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 ############################################################### |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 # # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 # Salut à Toi/sat_pubsub # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # This Dockerfile build a SàT Pubsub service for SàT # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 # Salut à Toi is a multi-frontends multi-purposes XMPP client # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 # # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 ############################################################### |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 FROM salutatoi/base:latest |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 MAINTAINER Goffi <goffi@goffi.org> |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 ############################ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 # AUTOMATIC CONFIGURATION # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 ############################ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 COPY scripts/sat_pubsub scripts/launch_postgres_and_pubsub.sh /usr/local/bin/ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 RUN chown root:root /usr/local/bin/sat_pubsub && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 chmod 0555 /usr/local/bin/sat_pubsub && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 chmod 0555 /usr/local/bin/launch_postgres_and_pubsub.sh && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
23 ######## |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
24 # BASE # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
25 ######## |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
26 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
27 apt-get install -y --no-install-recommends postgresql python-psycopg2 && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
28 apt-get clean && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
29 cd /usr/share && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
30 hg clone https://repos.goffi.org/sat_pubsub && chown -R sat:sat sat_pubsub && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
31 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
32 ############ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
33 # DATABASE # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
34 ############ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
35 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 cd sat_pubsub/db && \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
37 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
38 # To simplify installation, we integrate our own PostgreSQL |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
39 # future alternate version may use an external PostgreSQL container |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
41 service postgresql start; \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
42 su -c "createuser -d -w sat" postgres; \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
43 su -c "createdb pubsub" postgres; \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
44 su -c "psql pubsub < pubsub.sql" sat; \ |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
45 service postgresql stop |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
46 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
47 ########## |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
48 # LAUNCH # |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
49 ########## |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
50 |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
51 # we need to launch PostgreSQL, so we launch as root then switch to sat user |
29873a41aae1
docker: new docker files are now in sat main repos, this one is legacy
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
52 ENTRYPOINT ["launch_postgres_and_pubsub.sh"] |